[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v6 02/22] qapi: Add lock-mode in blockdev-add op
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v6 02/22] qapi: Add lock-mode in blockdev-add options |
Date: |
Mon, 20 Jun 2016 15:24:06 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 18.06.2016 um 13:16 hat Fam Zheng geschrieben:
> On Fri, 06/17 11:17, Kevin Wolf wrote:
> > Am 03.06.2016 um 10:48 hat Fam Zheng geschrieben:
> > > To allow overriding the default locking behavior when opening the image.
> > >
> > > Signed-off-by: Fam Zheng <address@hidden>
> > > ---
> > > qapi/block-core.json | 19 ++++++++++++++++++-
> > > 1 file changed, 18 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/qapi/block-core.json b/qapi/block-core.json
> > > index 98a20d2..23ec31d 100644
> > > --- a/qapi/block-core.json
> > > +++ b/qapi/block-core.json
> > > @@ -2032,6 +2032,20 @@
> > > '*read-pattern': 'QuorumReadPattern' } }
> > >
> > > ##
> > > +# @BlockdevLockMode
> > > +#
> > > +# Describes how QEMU should lock the image.
> > > +#
> > > +# @off: Disabled
> > > +# @shared: Use shared lock for both RO and RW images.
> > > +# @exclusive: Use exclusive lock for RW images, and shared lock for RO
> > > images.
> >
> > This feels odd. If I request 'exclusive', I want to have exclusive.
> > Reasons may include that I anticipate reopening the image r/w later for
> > a commit operation and don't want to have this blocked by other readers.
> >
> > I see where you're coming from, though, because this might not be a good
> > default. Perhaps we need to have both then, an 'exclusive' option that
> > does what it promises and a 'default' option that infers the wanted
> > locking mode from the writability of the image.
>
> Fair enough, though I'd call it "auto" instead of "default", what do you
> think?
Agreed, that's a better name.
Kevin
[Qemu-block] [PATCH v6 03/22] blockdev: Add and parse "lock-mode" option for image locking, Fam Zheng, 2016/06/03