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 > --- > 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