Re: [Qemu-devel] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-28 Thread Kevin Wolf
Am 28.04.2017 um 17:30 hat Fam Zheng geschrieben: > On Fri, 04/28 15:45, Kevin Wolf wrote: > > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > > This extends the permission bits of op blocker API to external using > > > Linux OFD locks. > > > > > > Each permission in @perm and @shared_perm

Re: [Qemu-devel] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-28 Thread Fam Zheng
On Fri, 04/28 15:45, Kevin Wolf wrote: > Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > > This extends the permission bits of op blocker API to external using > > Linux OFD locks. > > > > Each permission in @perm and @shared_perm is represented by a locked > > byte in the image file.

Re: [Qemu-devel] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-28 Thread Kevin Wolf
Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > This extends the permission bits of op blocker API to external using > Linux OFD locks. > > Each permission in @perm and @shared_perm is represented by a locked > byte in the image file. Requesting a permission in @perm is translated > to a

Re: [Qemu-devel] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-27 Thread Fam Zheng
On Wed, 04/26 16:22, Kevin Wolf wrote: > > @@ -455,6 +473,21 @@ static int raw_open_common(BlockDriverState *bs, QDict > > *options, > > } > > s->fd = fd; > > > > +s->lock_fd = -1; > > +fd = qemu_open(filename, O_RDONLY); > > Note that with /dev/fdset there can be cases where

Re: [Qemu-devel] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-26 Thread Kevin Wolf
Am 26.04.2017 um 05:34 hat Fam Zheng geschrieben: > This extends the permission bits of op blocker API to external using > Linux OFD locks. > > Each permission in @perm and @shared_perm is represented by a locked > byte in the image file. Requesting a permission in @perm is translated > to a

[Qemu-devel] [PATCH v15 20/21] file-posix: Add image locking to perm operations

2017-04-25 Thread Fam Zheng
This extends the permission bits of op blocker API to external using Linux OFD locks. Each permission in @perm and @shared_perm is represented by a locked byte in the image file. Requesting a permission in @perm is translated to a shared lock of the corresponding byte; rejecting to share the