Skip to content

Commit

Permalink
scsi: core: Allow non-root users to perform ZBC commands
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Ryan Attard <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
Ryan Attard authored and martinkpetersen committed Mar 16, 2020
1 parent 1e067dd commit 6fdb79f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6fdb79f

Please sign in to comment.