summaryrefslogtreecommitdiff
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
authorRyan Attard <ryanattard@ryanattard.info>2020-02-26 11:05:19 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-16 18:26:31 -0400
commit6fdb79ff27ee0d385ec8481458d2fd1d69fec50b (patch)
treed04693a1dad86c739e1bef318c0217b015388bcb /block/scsi_ioctl.c
parent1e067dd8a3681310a36302640dc33c4f3fb0c190 (diff)
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/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c4
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)