[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 2/3] block/file-posix: File locking during cr
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH v2 2/3] block/file-posix: File locking during creation |
Date: |
Thu, 10 May 2018 10:07:55 +0800 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, 05/09 23:53, 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 truncation to 0, and by taking the
> appropriate file locks between those two steps.
>
> Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>