Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-07 Thread Fam Zheng
On Fri, 05/04 15:45, Max Reitz wrote: > On 2018-05-03 08:45, Fam Zheng wrote: > > On Sat, 04/28 13:03, Max Reitz wrote: > >> On 2018-04-27 08:22, Fam Zheng wrote: > >>> On Sat, 04/21 00:09, Max Reitz wrote: > When creating a file, we should take the WRITE and RESIZE permissions. > We do

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-04 Thread Max Reitz
On 2018-05-03 08:45, Fam Zheng wrote: > On Sat, 04/28 13:03, Max Reitz wrote: >> On 2018-04-27 08:22, Fam Zheng wrote: >>> On Sat, 04/21 00:09, Max Reitz wrote: When creating a file, we should take the WRITE and RESIZE permissions. We do not need either for the creation itself, but we do

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-03 Thread Fam Zheng
On Sat, 04/28 13:03, Max Reitz wrote: > On 2018-04-27 08:22, Fam Zheng wrote: > > On Sat, 04/21 00:09, Max Reitz wrote: > >> When creating a file, we should take the WRITE and RESIZE permissions. > >> We do not need either for the creation itself, but we do need them for > >> clearing and resizing

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-04-28 Thread Max Reitz
On 2018-04-27 08:22, Fam Zheng wrote: > On Sat, 04/21 00:09, Max Reitz wrote: >> When creating a file, we should take the WRITE and RESIZE permissions. >> We do not need either for the creation itself, but we do need them for >> clearing and resizing it. So we can take the proper permissions by

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-04-27 Thread Fam Zheng
On Sat, 04/21 00:09, Max Reitz wrote: > When creating a file, we should take the WRITE and RESIZE permissions. > We do not need either for the creation itself, but we do need them for > clearing and resizing it. So we can take the proper permissions by > replacing O_TRUNC with an explicit