From 562af123d5eb080772f3c0273708a11472bc5ad5 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 8 Dec 2025 20:01:32 +0100 Subject: [PATCH] block: qcow: Add missing flush in write_refcount_block The BufWriter must be flushed explicitly to handle errors properly. Without explicit flush, errors during the implicit drop flush are ignored. This is the same issue fixed for write_pointer_table in commit 85556951a. Signed-off-by: Anatol Belski --- block/src/qcow/qcow_raw_file.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/block/src/qcow/qcow_raw_file.rs b/block/src/qcow/qcow_raw_file.rs index 1d9dbc0b5..18a1c771e 100644 --- a/block/src/qcow/qcow_raw_file.rs +++ b/block/src/qcow/qcow_raw_file.rs @@ -102,6 +102,7 @@ impl QcowRawFile { for count in table { buffer.write_u16::(*count)?; } + buffer.flush()?; Ok(()) }