qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] scsi, block: introduce persistent reservation managers
@ 2017-09-19 10:24 Paolo Bonzini
  2017-09-19 10:24 ` [Qemu-devel] [PATCH 1/4] scsi, file-posix: add support for persistent reservation management Paolo Bonzini
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Paolo Bonzini @ 2017-09-19 10:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block

SCSI persistent Reservations allow restricting access to block devices
to specific initiators in a shared storage setup.  When implementing
clustering of virtual machines, it is a common requirement for virtual
machines to send persistent reservation SCSI commands.  However,
the operating system restricts sending these commands to unprivileged
programs because incorrect usage can disrupt regular operation of the
storage fabric.

With these patches, the scsi-block and scsi-generic SCSI passthrough
devices learn to delegate the implementation of persistent reservations to
a separate object, the "persistent reservation manager".  The persistent
reservation manager talks to a separate privileged program, with a very
simple protocol based on SCM_RIGHTS.  In addition to invoking PERSISTENT
RESERVATION OUT and PERSISTENT RESERVATION IN commands, the privileged
component can also use libmpathpersist so that persistent reservations
are applied to all paths in a multipath setting.

Patch 1 defines the abstract QOM class and plugs it into block/file-posix.c.

Patch 2 and 3 introduce the privileged helper program, while patch 4
defines the concrete QOM class that talks to it.

Paolo

v1->v2: removed scsi/ patches which were all reviewed
        removed man page (requires .texi while I used .rst for docs)
        qio_channel_read/write_all also went in independently
        fix installation of qemu-pr-helper man page
        fixes to documentation
        added BSD license to protocol header
        added handling of residual (buffer underrun)
        fixed closing of file descriptors on error
        block PERSISTENT RESERVE OUT for read-only file descriptors
        do not use g_assert
        use EXIT_SUCCESS/EXIT_FAILURE consistently
        moved all CONFIG_MPATH usage to the right patch
        drop CAP_SYS_ADMIN if multipath not compiled in
        simplify buffer size handling in multipath PERSISTENT RESERVE IN
        block REGISTER AND MOVE operation for multipath PERSISTENT RESERVE OUT
        fixed transport id handling in multipath PERSISTENT RESERVE OUT
        fixed string property double-free in pr-manager-helper
        fixed/cleaned up error handling in pr-manager-helper
        
Paolo Bonzini (9):
  scsi, file-posix: add support for persistent reservation management
  scsi: build qemu-pr-helper
  scsi: add multipath support to qemu-pr-helper
  scsi: add persistent reservation manager using qemu-pr-helper

 Makefile                   |   14 +-
 configure                  |   59 ++-
 docs/interop/pr-helper.rst |   83 ++++
 docs/pr-manager.rst        |   60 +++
 include/scsi/utils.h       |    4 +
 scsi/Makefile.objs         |    2 +-
 scsi/pr-helper.h           |   41 ++
 scsi/pr-manager-helper.c   |  302 +++++++++++++
 scsi/qemu-pr-helper.c      | 1038 ++++++++++++++++++++++++++++++++++++++++++++
 scsi/utils.c               |   10 +
 10 files changed, 1607 insertions(+), 6 deletions(-)

-- 
2.13.5

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

end of thread, other threads:[~2017-09-21 16:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19 10:24 [Qemu-devel] [PATCH v2 0/4] scsi, block: introduce persistent reservation managers Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 1/4] scsi, file-posix: add support for persistent reservation management Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 2/4] scsi: build qemu-pr-helper Paolo Bonzini
2017-09-19 13:33   ` Daniel P. Berrange
2017-09-19 14:25     ` Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 3/4] scsi: add multipath support to qemu-pr-helper Paolo Bonzini
2017-09-19 10:24 ` [Qemu-devel] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper Paolo Bonzini
2017-09-19 12:50   ` Daniel P. Berrange
2017-09-19 12:53   ` Daniel P. Berrange
2017-09-19 12:57     ` Paolo Bonzini
2017-09-19 13:12       ` Daniel P. Berrange
2017-09-19 13:23         ` Paolo Bonzini
2017-09-19 13:26           ` Daniel P. Berrange
2017-09-19 14:32             ` Paolo Bonzini
2017-09-21 16:20           ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2017-09-21 16:07 ` [Qemu-devel] [Qemu-block] [PATCH v2 0/4] scsi, block: introduce persistent reservation managers Stefan Hajnoczi
2017-09-21 16:22 ` [Qemu-devel] " no-reply
2017-09-21 16:24 ` no-reply
2017-09-21 16:29   ` 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).