All of lore.kernel.org
 help / color / mirror / Atom feed
From: rattard@ryanattard.info
To: axboe@kernel.dk, linux-scsi@vger.kernel.org,
	dgilbert@interlog.com, JBottomley@parallels.com
Cc: Ryan Attard <ryanattard@ryanattard.info>
Subject: [PATCH 1/1] Allow non-root users to perform ZBC commands.
Date: Wed, 18 Dec 2019 10:40:09 -0600	[thread overview]
Message-ID: <20191218164008.99155-2-rattard@ryanattard.info> (raw)
In-Reply-To: <20191218164008.99155-1-rattard@ryanattard.info>

From: Ryan Attard <ryanattard@ryanattard.info>

Allow users with read permissions to issue REPORT ZONE commands and
users with write permissions to manage zones on devices supporting the
ZBC specification.

Signed-off-by: Ryan Attard <ryanattard@ryanattard.info>
---
 block/scsi_ioctl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 260fa80ef575..005a84b2ecdb 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -194,6 +194,11 @@ 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 has_write_perm)
-- 
2.24.0


      reply	other threads:[~2019-12-18 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 16:40 [PATCH 0/1] Allow non-root users to perform ZBC commands rattard
2019-12-18 16:40 ` rattard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191218164008.99155-2-rattard@ryanattard.info \
    --to=rattard@ryanattard.info \
    --cc=JBottomley@parallels.com \
    --cc=axboe@kernel.dk \
    --cc=dgilbert@interlog.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ryanattard@ryanattard.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.