[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH v6 04/22] block: Introduce image fi

From: Fam Zheng
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v6 04/22] block: Introduce image file locking
Date: Wed, 8 Jun 2016 10:45:29 +0800
User-agent: Mutt/1.6.1 (2016-04-27)

On Tue, 06/07 21:51, Jason Dillaman wrote:
> On Fri, Jun 3, 2016 at 4:48 AM, Fam Zheng <address@hidden> wrote:
> > +typedef enum {
> > +    /* The values are ordered so that lower number implies higher 
> > restriction.
> > +     * Starting from 1 to make 0 an invalid value.
> > +     * */
> > +} BdrvLockfCmd;
> > +
> We started to talk about new APIs in librbd to support this feature
> where we don't need to worry about admin action should QEMU crash
> while holding the lock.
> Any chance for separating the UNLOCK enum into the exclusive vs shared
> case? We could do some magic in the rbd block driver to guess how it
> was locked but it seems like it would be cleaner (at least for us) to
> explicitly call out what type of unlock you are requesting since it
> will involve different API methods.

This should be possible but I'm not sure I fully understand the rationale
behind it. The server side who implements the lock and keeps track of states
should have the lock type information already, why is it necessary for the
client to be explicit? It doesn't sound necessary to me at all from an
interface point of view. Can you elaborate more on the API methods that need


reply via email to

[Prev in Thread] Current Thread [Next in Thread]