qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] block: fix preallocate filter: don't do unaligned preallocat


From: Hanna Reitz
Subject: Re: [PATCH] block: fix preallocate filter: don't do unaligned preallocate requests
Date: Thu, 24 Feb 2022 16:06:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]