[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate(
From: |
Max Reitz |
Subject: |
Re: [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate() |
Date: |
Mon, 25 Nov 2019 13:00:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 22.11.19 17:05, Kevin Wolf wrote:
> This adds a no_fallback parameter to bdrv_co_truncate(), bdrv_truncate()
> and blk_truncate() in preparation for a fix that potentially needs to
> zero-write the new area. no_fallback will use BDRV_REQ_NO_FALLBACK for
> this operation and lets the truncate fail if an efficient zero write
> isn't possible.
>
> Only qmp_block_resize() passes true for this parameter because it is a
> blocking monitor command, so we don't want to add more potentially slow
> I/O operations to it than we already have.
>
> All other users will accept even a slow fallback to avoid failure.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> include/block/block.h | 5 +++--
> include/sysemu/block-backend.h | 2 +-
> block/block-backend.c | 4 ++--
> block/commit.c | 4 ++--
> block/crypto.c | 4 ++--
> block/io.c | 16 ++++++++++++----
> block/mirror.c | 2 +-
> block/parallels.c | 6 +++---
> block/qcow.c | 4 ++--
> block/qcow2-refcount.c | 2 +-
> block/qcow2.c | 19 +++++++++++--------
> block/qed.c | 2 +-
> block/raw-format.c | 2 +-
> block/vdi.c | 2 +-
> block/vhdx-log.c | 2 +-
> block/vhdx.c | 6 +++---
> block/vmdk.c | 10 ++++++----
> block/vpc.c | 2 +-
> blockdev.c | 2 +-
> qemu-img.c | 2 +-
> qemu-io-cmds.c | 2 +-
> tests/test-block-iothread.c | 6 +++---
> 22 files changed, 60 insertions(+), 46 deletions(-)
With the typo pointed out by Eric fixed:
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [PATCH for-4.2? v3 0/8] block: Fix resize (extending) of short overlays, Kevin Wolf, 2019/11/22
- [PATCH v3 1/8] block: bdrv_co_do_pwrite_zeroes: 64 bit 'bytes' parameter, Kevin Wolf, 2019/11/22
- [PATCH v3 3/8] qcow2: Declare BDRV_REQ_NO_FALLBACK supported, Kevin Wolf, 2019/11/22
- [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate(), Kevin Wolf, 2019/11/22
- [PATCH v3 4/8] block: truncate: Don't make backing file data visible, Kevin Wolf, 2019/11/22
- [PATCH v3 5/8] iotests: Add qemu_io_log(), Kevin Wolf, 2019/11/22
- [PATCH v3 7/8] iotests: Support job-complete in run_job(), Kevin Wolf, 2019/11/22
- [PATCH v3 6/8] iotests: Fix timeout in run_job(), Kevin Wolf, 2019/11/22
- [PATCH v3 8/8] iotests: Test committing to short backing file, Kevin Wolf, 2019/11/22