diff options
author | Ryan Attard <ryanattard@ryanattard.info> | 2020-02-26 18:05:19 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-03-16 23:26:31 +0100 |
commit | 6fdb79ff27ee0d385ec8481458d2fd1d69fec50b (patch) | |
tree | d04693a1dad86c739e1bef318c0217b015388bcb /block | |
parent | scsi: hisi_sas: Use dev_err() in read_iost_itct_cache_v3_hw() (diff) | |
download | linux-6fdb79ff27ee0d385ec8481458d2fd1d69fec50b.tar.xz linux-6fdb79ff27ee0d385ec8481458d2fd1d69fec50b.zip |
scsi: core: Allow non-root users to perform ZBC commands
Allow users with read permissions to issue REPORT ZONE commands and users
with write permissions to manage zones on block devices supporting the ZBC
specification.
Link: https://lore.kernel.org/r/20200226170518.92963-2-ryanattard@ryanattard.info
Signed-off-by: Ryan Attard <ryanattard@ryanattard.info>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/scsi_ioctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index b4e73d5dd5c2..ef722f04f88a 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -193,6 +193,10 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter) __set_bit(GPCMD_LOAD_UNLOAD, filter->write_ok); __set_bit(GPCMD_SET_STREAMING, filter->write_ok); __set_bit(GPCMD_SET_READ_AHEAD, filter->write_ok); + + /* ZBC Commands */ + __set_bit(ZBC_OUT, filter->write_ok); + __set_bit(ZBC_IN, filter->read_ok); } int blk_verify_command(unsigned char *cmd, fmode_t mode) |