Re: [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 n

Re: [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-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-02 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-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-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-04-26 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 truncati

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

2018-04-20 Thread Max Reitz
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 truncation to 0, and by taking the appropriate file lo