Home
last modified time | relevance | path

Searched hist:b8cf1913 (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/block/
H A Dfile-posix.cb8cf1913 Wed May 09 16:53:35 CDT 2018 Max Reitz <mreitz@redhat.com> block/file-posix: File locking during creation

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 <mreitz@redhat.com>
Message-id: 20180509215336.31304-3-mreitz@redhat.com
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>