[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 5/6] block: Use tracked request for truncate
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v2 5/6] block: Use tracked request for truncate |
Date: |
Wed, 27 Jun 2018 12:57:21 +0100 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Tue, Jun 26, 2018 at 04:24:33PM +0200, Kevin Wolf wrote:
> When growing an image, block drivers (especially protocol drivers) may
> initialise the newly added area. I/O requests to the same area need to
> wait for this initialisation to be completed so that data writes don't
> get overwritten and reads don't read uninitialised data.
>
> To avoid overhead in the fast I/O path by adding new locking in the
> protocol drivers and to restrict the impact to requests that actually
> touch the new area, reuse the existing tracked request infrastructure in
> block/io.c and mark all discard requests as serialising.
>
> With this change, it is safe for protocol drivers to make
> .bdrv_co_truncate actually asynchronous.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> include/block/block_int.h | 1 +
> block/io.c | 25 +++++++++++++++++++++++++
> 2 files changed, 26 insertions(+)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-block] [PATCH v2 0/6] file-posix: Make truncate/preallocate asynchronous, Kevin Wolf, 2018/06/26
- [Qemu-block] [PATCH v2 1/6] qcow2: Fix qcow2_truncate() error return value, Kevin Wolf, 2018/06/26
- [Qemu-block] [PATCH v2 3/6] qcow2: Remove coroutine trampoline for preallocate_co(), Kevin Wolf, 2018/06/26
- [Qemu-block] [PATCH v2 4/6] block: Move bdrv_truncate() implementation to io.c, Kevin Wolf, 2018/06/26
- [Qemu-block] [PATCH v2 5/6] block: Use tracked request for truncate, Kevin Wolf, 2018/06/26
- Re: [Qemu-block] [PATCH v2 5/6] block: Use tracked request for truncate,
Stefan Hajnoczi <=
- [Qemu-block] [PATCH v2 2/6] block: Convert .bdrv_truncate callback to coroutine_fn, Kevin Wolf, 2018/06/26
- [Qemu-block] [PATCH v2 6/6] file-posix: Make .bdrv_co_truncate asynchronous, Kevin Wolf, 2018/06/26
- Re: [Qemu-block] [PATCH v2 0/6] file-posix: Make truncate/preallocate asynchronous, Stefan Hajnoczi, 2018/06/27