From: Fam Zheng <famz@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions"
Date: Wed, 12 Apr 2017 00:32:44 +0800 [thread overview]
Message-ID: <20170411163244.GE8507@lemon> (raw)
In-Reply-To: <20170411155226.6395-1-mreitz@redhat.com>
On Tue, 04/11 17:52, Max Reitz wrote:
> This reverts commit e3e0003a8f6570aba1421ef99a0b383a43371a74.
>
> This commit was necessary for the 2.9 release because we were unable to
> fix the underlying issue(s) in time. However, we will be for 2.10.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> block.c | 6 +-----
> block/io.c | 12 ++----------
> 2 files changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/block.c b/block.c
> index 1fbbb8d606..086a12df97 100644
> --- a/block.c
> +++ b/block.c
> @@ -3274,11 +3274,7 @@ int bdrv_truncate(BdrvChild *child, int64_t offset)
> BlockDriver *drv = bs->drv;
> int ret;
>
> - /* FIXME: Some format block drivers use this function instead of implicitly
> - * growing their file by writing beyond its end.
> - * See bdrv_aligned_pwritev() for an explanation why we currently
> - * cannot assert this permission in that case. */
> - // assert(child->perm & BLK_PERM_RESIZE);
> + assert(child->perm & BLK_PERM_RESIZE);
>
> if (!drv)
> return -ENOMEDIUM;
> diff --git a/block/io.c b/block/io.c
> index 8706bfa578..bae6947032 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -1345,16 +1345,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child,
> assert(!waited || !req->serialising);
> assert(req->overlap_offset <= offset);
> assert(offset + bytes <= req->overlap_offset + req->overlap_bytes);
> - /* FIXME: Block migration uses the BlockBackend of the guest device at a
> - * point when it has not yet taken write permissions. This will be
> - * fixed by a future patch, but for now we have to bypass this
> - * assertion for block migration to work. */
> - // assert(child->perm & BLK_PERM_WRITE);
> - /* FIXME: Because of the above, we also cannot guarantee that all format
> - * BDS take the BLK_PERM_RESIZE permission on their file BDS, since
> - * they are not obligated to do so if they do not have any parent
> - * that has taken the permission to write to them. */
> - // assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
> + assert(child->perm & BLK_PERM_WRITE);
> + assert(end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE);
>
> ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req);
>
> --
> 2.12.2
>
>
Acked-by: Fam Zheng <famz@redhat.com>
next prev parent reply other threads:[~2017-04-11 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 15:52 [Qemu-devel] [PATCH for-2.10] Revert "block/io: Comment out permission assertions" Max Reitz
2017-04-11 16:32 ` Fam Zheng [this message]
2017-04-13 13:28 ` Stefan Hajnoczi
2017-04-13 14:34 ` Max Reitz
2017-04-14 1:10 ` [Qemu-devel] [Qemu-block] " John Snow
2017-04-14 6:46 ` Stefan Hajnoczi
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=20170411163244.GE8507@lemon \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).