Skip to content

Commit 6fdb79f

Browse files
Ryan Attardmartinkpetersen
authored andcommitted
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>
1 parent 1e067dd commit 6fdb79f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎block/scsi_ioctl.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
193193
__set_bit(GPCMD_LOAD_UNLOAD, filter->write_ok);
194194
__set_bit(GPCMD_SET_STREAMING, filter->write_ok);
195195
__set_bit(GPCMD_SET_READ_AHEAD, filter->write_ok);
196+
197+
/* ZBC Commands */
198+
__set_bit(ZBC_OUT, filter->write_ok);
199+
__set_bit(ZBC_IN, filter->read_ok);
196200
}
197201

198202
int blk_verify_command(unsigned char *cmd, fmode_t mode)

0 commit comments

Comments
 (0)