From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH v2 0/4] scsi, block: introduce persistent reservation managers
Date: Tue, 19 Sep 2017 12:24:30 +0200 [thread overview]
Message-ID: <20170919102434.21147-1-pbonzini@redhat.com> (raw)
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
next reply other threads:[~2017-09-19 10:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 10:24 Paolo Bonzini [this message]
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
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=20170919102434.21147-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 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).