lkml.org 
[lkml]   [2020]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers
On Thu, Jan 02, 2020 at 03:55:31PM +0100, Arnd Bergmann wrote:
> Each driver calling scsi_ioctl() gets an equivalent compat_ioctl()
> handler that implements the same commands by calling scsi_compat_ioctl().
>
> The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible
> at this point, so any driver that calls those can do so for both native
> and compat mode, with the argument passed through compat_ptr().
>
> With this, we can remove the entries from fs/compat_ioctl.c. The new
> code is larger, but should be easier to maintain and keep updated with
> newly added commands.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/block/virtio_blk.c | 3 +
> drivers/scsi/ch.c | 9 ++-
> drivers/scsi/sd.c | 50 ++++++--------
> drivers/scsi/sg.c | 44 ++++++++-----
> drivers/scsi/sr.c | 57 ++++++++++++++--
> drivers/scsi/st.c | 51 ++++++++------
> fs/compat_ioctl.c | 132 +------------------------------------
> 7 files changed, 142 insertions(+), 204 deletions(-)

virtio_blk.c changes:

Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-01-02 17:34    [W:0.300 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site