Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Fam Zheng
On Tue, 08/14 10:22, Kevin Wolf wrote: > Am 14.08.2018 um 10:12 hat Fam Zheng geschrieben: > > On Mon, 08/13 15:42, Kevin Wolf wrote: > > > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > > > If we know we've already locked the bytes, don't do it again; similarly > > > > don't unlock a byte i

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 10:12 hat Fam Zheng geschrieben: > On Mon, 08/13 15:42, Kevin Wolf wrote: > > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > > If we know we've already locked the bytes, don't do it again; similarly > > > don't unlock a byte if we haven't locked it. This doesn't change the >

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Fam Zheng
On Mon, 08/13 15:42, Kevin Wolf wrote: > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > If we know we've already locked the bytes, don't do it again; similarly > > don't unlock a byte if we haven't locked it. This doesn't change the > > behavior, but fixes a corner case explained below. > >

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-13 Thread Kevin Wolf
Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > If we know we've already locked the bytes, don't do it again; similarly > don't unlock a byte if we haven't locked it. This doesn't change the > behavior, but fixes a corner case explained below. > > Libvirt had an error handling bug that an imag

[Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-12 Thread Fam Zheng
If we know we've already locked the bytes, don't do it again; similarly don't unlock a byte if we haven't locked it. This doesn't change the behavior, but fixes a corner case explained below. Libvirt had an error handling bug that an image can get its (ownership, file mode, SELinux) permissions ch