qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hanna Reitz <hreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, fam@euphon.net, qemu-devel@nongnu.org,
	stefanha@redhat.com, "Denis V . Lunev" <den@openvz.org>
Subject: Re: [PATCH] block: fix preallocate filter: don't do unaligned preallocate requests
Date: Thu, 24 Feb 2022 16:06:46 +0100	[thread overview]
Message-ID: <62b4181d-7188-cb24-a947-1c68fb3b8d4b@redhat.com> (raw)
In-Reply-To: <20220215121609.38570-1-vsementsov@virtuozzo.com>

On 15.02.22 13:16, Vladimir Sementsov-Ogievskiy wrote:
> There is a bug in handling BDRV_REQ_NO_WAIT flag: we still may wait in
> wait_serialising_requests() if request is unaligned. And this is
> possible for the only user of this flag (preallocate filter) if
> underlying file is unaligned to its request_alignment on start.
>
> So, we have to fix preallocate filter to do only aligned preallocate
> requests.
>
> Next, we should fix generic block/io.c somehow. Keeping in mind that
> preallocate is the only user of BDRV_REQ_NO_WAIT and that we have to
> fix its behavior now, it seems more safe to just assert that we never
> use BDRV_REQ_NO_WAIT with unaligned requests and add corresponding
> comment. Let's do so.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Reviewed-by: Denis V. Lunev <den@openvz.org>
> ---
>   include/block/block.h |  3 ++-
>   block/io.c            |  4 ++++
>   block/preallocate.c   | 15 ++++++++++++---
>   3 files changed, 18 insertions(+), 4 deletions(-)

Thanks, applied to my block branch:

https://gitlab.com/hreitz/qemu/-/commits/block



      reply	other threads:[~2022-02-24 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 12:16 [PATCH] block: fix preallocate filter: don't do unaligned preallocate requests Vladimir Sementsov-Ogievskiy
2022-02-24 15:06 ` Hanna Reitz [this message]

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=62b4181d-7188-cb24-a947-1c68fb3b8d4b@redhat.com \
    --to=hreitz@redhat.com \
    --cc=den@openvz.org \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.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).