linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: allow persistent reservations without CAP_SYS_RAWIO
@ 2012-06-12 16:08 Paolo Bonzini
  2012-06-12 16:21 ` James Bottomley
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Paolo Bonzini @ 2012-06-12 16:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: axboe, linux-scsi, jbottomley

Persistent reservations commands cannot be issued right now without
giving CAP_SYS_RAWIO to the process who wishes to send them.  This
is a bit heavy-handed, allow these two commands.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
        Ok for 3.5 as well?

 block/scsi_ioctl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index 260fa80..5d6c9c1 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -137,6 +137,7 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
 	__set_bit(SERVICE_ACTION_IN, filter->read_ok);
 	__set_bit(RECEIVE_DIAGNOSTIC, filter->read_ok);
 	__set_bit(MAINTENANCE_IN, filter->read_ok);
+	__set_bit(PERSISTENT_RESERVE_IN, filter->read_ok);
 	__set_bit(GPCMD_READ_BUFFER_CAPACITY, filter->read_ok);
 
 	/* Audio CD commands */
@@ -178,6 +179,7 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
 	__set_bit(GPCMD_MODE_SELECT_10, filter->write_ok);
 	__set_bit(MODE_SELECT, filter->write_ok);
 	__set_bit(LOG_SELECT, filter->write_ok);
+	__set_bit(PERSISTENT_RESERVE_OUT, filter->write_ok);
 	__set_bit(GPCMD_BLANK, filter->write_ok);
 	__set_bit(GPCMD_CLOSE_TRACK, filter->write_ok);
 	__set_bit(GPCMD_FLUSH_CACHE, filter->write_ok);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-06-12 19:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 16:08 [PATCH] scsi: allow persistent reservations without CAP_SYS_RAWIO Paolo Bonzini
2012-06-12 16:21 ` James Bottomley
2012-06-12 16:24   ` Paolo Bonzini
2012-06-12 16:54     ` Paolo Bonzini
2012-06-12 17:20       ` James Bottomley
2012-06-12 17:25         ` Paolo Bonzini
2012-06-12 18:02           ` James Bottomley
2012-06-12 18:39             ` Paolo Bonzini
2012-06-12 16:55 ` Alan Cox
2012-06-12 17:08   ` Paolo Bonzini
2012-06-12 18:52     ` Can we pass a file handle down to the block ioctls to implement per file filters on scsi SG_IO ? Alan Cox
2012-06-12 19:13       ` Paolo Bonzini
2012-06-12 17:08 ` [PATCH] scsi: allow persistent reservations without CAP_SYS_RAWIO John Stoffel
2012-06-12 17:13   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).