qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/3] block/file-posix: File locking during creation
Date: Thu, 10 May 2018 10:07:55 +0800	[thread overview]
Message-ID: <20180510020755.GB4492@lemon.usersys.redhat.com> (raw)
In-Reply-To: <20180509215336.31304-3-mreitz@redhat.com>

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 <mreitz@redhat.com>

Reviewed-by: Fam Zheng <famz@redhat.com>

  reply	other threads:[~2018-05-10  2:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 21:53 [Qemu-devel] [PATCH v2 0/3] block/file-posix: File locking during creation Max Reitz
2018-05-09 21:53 ` [Qemu-devel] [PATCH v2 1/3] block/file-posix: Pass FD to locking helpers Max Reitz
2018-05-09 21:53 ` [Qemu-devel] [PATCH v2 2/3] block/file-posix: File locking during creation Max Reitz
2018-05-10  2:07   ` Fam Zheng [this message]
2018-05-09 21:53 ` [Qemu-devel] [PATCH v2 3/3] iotests: Add creation test to 153 Max Reitz
2018-06-01 11:00 ` [Qemu-devel] [PATCH v2 0/3] block/file-posix: File locking during creation Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180510020755.GB4492@lemon.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).