Re: [Qemu-devel] [PATCH v6 08/22] raw-posix: Add image locking support

2016-06-22 Thread Fam Zheng
On Fri, 06/17 15:07, Kevin Wolf wrote: > Am 03.06.2016 um 10:49 hat Fam Zheng geschrieben: > > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > > the intervene. > > > > Both file and host device protocols are covered. > > > > The complication is with reopen. We have three diff

Re: [Qemu-devel] [PATCH v6 08/22] raw-posix: Add image locking support

2016-06-17 Thread Kevin Wolf
Am 03.06.2016 um 10:49 hat Fam Zheng geschrieben: > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > the intervene. > > Both file and host device protocols are covered. > > The complication is with reopen. We have three different locking states, > namely "unlocked", "shared lo

Re: [Qemu-devel] [PATCH v6 08/22] raw-posix: Add image locking support

2016-06-03 Thread Fam Zheng
On Fri, 06/03 16:49, Fam Zheng wrote: > +static > +int raw_reopen_downgrade(BDRVReopenState *state, > + RawReopenOperation op, > + BdrvLockfCmd old_lock, > + BdrvLockfCmd new_lock, > + Error **errp) > +{

[Qemu-devel] [PATCH v6 08/22] raw-posix: Add image locking support

2016-06-03 Thread Fam Zheng
virtlockd in libvirt locks the first byte, we lock byte 1 to avoid the intervene. Both file and host device protocols are covered. The complication is with reopen. We have three different locking states, namely "unlocked", "shared locked" and "exclusively locked". There have three different stat