From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11021107.outbound.protection.outlook.com [40.107.130.107]) by lore.virtuozzo.com (Postfix) with ESMTPS id 958568045D for ; Wed, 4 Nov 2026 14:41:27 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ng7NsSeFeE8p8y1Mo78ypbOHGxagGm3SMRfZqN5+V9+1SU1nOJ4HS58CWsAOdN+XcuR4VGqOrqwgnC3d7Kb7pe9yaUm/48tnSwJTp3a+C+Tq0GULjtKhrW62zFwbxy4QUCpxl96Hjhepfp2i3YPBEW3ru9MD7ph67BmWteMhbK+pqzYVL2gYheFSbmOyJZvYl9m693DqZ81iNYuCpNFveRQDyqvuqmYAxW2Oo2Zt9S0gdhMyDD8ybyFVwPXQWVmv9enCh4OIM5O7/6EdWjxVoDtBP6+fgn9kcISPq3hEgGWC2vcIwuEc81t5jOawHbkFzLYDPIiX86wAQ5qUcwesGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DTYCafv8X4ZycpMalUfrjGezRFbdos8VzV0qW7nsHBE=; b=AcpPQ2SyebCViuP7VAoeor/VJmfRlbo4ZWHeM31J0jN3PxKRXsXPabVnq1hur2r4NSeohpubuOvTE6U+qVb8hpcYh9MQDY/whADTqnMoP6uIbrs/aQEHSxS0Zkxl771b8vzdW0TB25SSnEKUwZYIl8l4TJZB7GXgbYhfUzNxVTLWOlb5yEx07pb0EJlcG1ivIDBQu5CP7mqSLrlSHXY3srRwwL9/gdhuLc2JUmZXzIhKBkFlOKtqwYjRgEY5GaAJ3ObHJuZCAwy0SnJgYj88rcEiRlj06bNwxBmmksvRqg8JmEfmtyefVq6pQIx5dD1DnnRs3+vDyTp/PHhCwcfAxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 2a00:1450:4864:20::329) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=openvz.org; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=openvz.org; dkim=pass (signature was verified) header.d=openvz.org; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.onmicrosoft.com; s=selector2-virtuozzo-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DTYCafv8X4ZycpMalUfrjGezRFbdos8VzV0qW7nsHBE=; b=EBggZVm8+E5u+NBgah2ilv9f+CgnjQkiyC3R++J00hTXBpz07vKo+EGDJDlc7OCpLywVDdURgjQS4wpKlgRdhZ5jJ34SYrUdA4M35yyOAEITQj4m+zuyBOZR3Q6zfYNqrlT9h1Pq5bFqLIXwmMxDnEk89gubHWX6rNxxoGmOf4M= Received: from GVZP280CA0092.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:275::13) by DB9PR08MB8360.eurprd08.prod.outlook.com (2603:10a6:10:3d8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.12; Wed, 4 Nov 2026 14:41:20 +0000 Received: from WA1PEPF00009B39.eurprd05.prod.outlook.com (2603:10a6:150:275:cafe::4c) by GVZP280CA0092.outlook.office365.com (2603:10a6:150:275::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.10 via Frontend Transport; Wed, 4 Nov 2026 14:41:20 +0000 Authentication-Results: spf=pass (sender IP is 2a00:1450:4864:20::329) smtp.mailfrom=openvz.org; dkim=pass (signature was verified) header.d=openvz.org;dmarc=pass action=none header.from=openvz.org; Received-SPF: Pass (protection.outlook.com: domain of openvz.org designates 2a00:1450:4864:20::329 as permitted sender) receiver=protection.outlook.com; client-ip=2a00:1450:4864:20::329; helo=mail-wm1-x329.google.com; pr=C Received: from mail-wm1-x329.google.com (2a00:1450:4864:20::329) by WA1PEPF00009B39.mail.protection.outlook.com (2603:10a6:1d8::116) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.5 via Frontend Transport; Wed, 4 Nov 2026 14:41:18 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4afe2d546f9so9261925e9.3 for ; Wed, 04 Nov 2026 06:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793803278; x=1794408078; darn=virtuozzo.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=DTYCafv8X4ZycpMalUfrjGezRFbdos8VzV0qW7nsHBE=; b=j3Vrxum8IDi6IbfSwI5xaJ0W1aV3C6FXJJEICwnjBjHF2RjPkINnarL8Px/AVF4iIc L3R7kD6B972PkXeW4HigbK/k1RER/pskBGP+l0NguOEhf0Yx95xwyemu6wh+ZTc4yeEl gD8t1wEpA99o6TfYGlNg1Qx7E/uiT3ciuhJqreGpDHykyKYY+J3Ct9np7GPS9e3XFsbR bZ6q+9PCgq+cw5mEj1syJtSbaczrbmMnKmO4Qovr9EzuBSjWNVubqWALOQN1g8hiQ+rW UF7/cDFoFVG1cSW0aNTH6fDRI9YCJpKY7uLcQEds+5pe4mQq+D0qm2Dq7tmV+5OkxWwU cFgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793803278; x=1794408078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=DTYCafv8X4ZycpMalUfrjGezRFbdos8VzV0qW7nsHBE=; b=Btt56S57E1zsn+iz7IIRpDyukfU2bgo1hh5fiDdn8Wdqm5om4XSPVX3ACPfSWCejDV 64TVvd3BzdkK5Clngf4dDUzaZc/BJnsvPLDReHrIYPY1sxKJ7L3e7wb3wZfU2OsrN/fI VHApC2Ma2He2HbwQKJBj3O5gRmrqNt+u0a2tcNxSWDN8JYyLV5NvUNPRUoAZB20w6WbD Giz8Jm9Yeff2N57DFk0i0VoZAMYm7qQ7h08Z9L4lc/VFvRCWmisaXBOhUiAoha06e1IP 9Ex0xi7+mqhNyiF3teS/PlKBWV4zbx49YXC1djPbHxxL2j9g0N5JnytMWkV55aGkZoWC s76w== X-Gm-Message-State: APuU4Z/nnwQf5BD+EoFUODvAUKmZpxalTEWCO8OVJeo5iGuK95/ynUm4 6+3Gf9dzqDwUQ6K2vxHkdjQ63PazGg9+863wXOuvEjdU2GdFuoLywoyQ0w/KN4joHnLYLQ== X-Gm-Gg: AYBFou3hq7rH4VKmsec6GWu1hwkpn0/2r7dLtjrLFwBRnyMxQ2F690z6ny+fCSW39CC aZuWwELmgRVF69SyOS3fzTVGb/vRvdkco9Hi2XPNwcU9MIhPjTXLCWWabeQC7YAcKM9i16MFl8y 5bcrsMd3GN68ejkp8QKYzpXdGIgUnoTkq9O9mYmdSZyF+YUOa+vc1wUayjoZV/kEidk/INfSyoJ vqeI4NxD+zI2yp4u70LSpmo7bA896Cyf1M9kq+Csebh/McDMRWn50/FXf+QaEgBf7eNR+q0Z7aL hvzymeF8WB2fkBa87ne7wJOZHrSGBfn/kNms6YjttN20K9Ek+0yk0Bv9j/9tvGJqX3Sx09aYUrt GKbztNj0eISI++U3TLqbb/AZjys9rx6beuG8YiD+yb6tbaxW3ug2Rw3Gz3Lo3HPofItDftrZl8f RKPgcINo0S1VFQ0gpTG4ePmhr7MdKkVgs9ah3MiaTzLQm5Keg3gK45AKU8ZQC9d+W2XdM8p7tkr vFlmzrup+bZfS3Srmj0dtqFnGhUhbaVDAe/wCEVIeUoSDPKol77WF6hST69LZiFVC09CkfI+uMu QQB+x1uQjQKJHruSmkzla1Edqg== X-Received: by 2002:a05:600c:8b54:b0:4a1:fa21:fd90 with SMTP id 5b1f17b1804b1-4ac16bc547dmr392687625e9.9.1793803278087; Wed, 04 Nov 2026 06:41:18 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:162e:5a6e:fd46:18b7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4b2ab010a66sm195225105e9.13.2026.11.04.06.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2026 06:41:17 -0800 (PST) From: "Denis V. Lunev" To: andrey.drobyshev@virtuozzo.com Cc: svt-core@virtuozzo.com, den@openvz.org Subject: [PATCH hci-dev 1/2] qcow2: do not clear the dirty bit when reopening a read-only node #VSTOR-140073 Date: Wed, 4 Nov 2026 15:41:12 +0100 Message-ID: <20261104144113.1587724-2-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261104144113.1587724-1-den@openvz.org> References: <20261104144113.1587724-1-den@openvz.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: WA1PEPF00009B39:EE_|DB9PR08MB8360:EE_ X-MS-Office365-Filtering-Correlation-Id: 96977818-8c4d-4f12-6708-08df3a81b010 X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|704160211799003|43022699015|82310400026|6059299003|61400799027|376014|48200799018|9140799003|6133799003|10067099003|22082099003|261102123227099003|18056099003|55112099003|18002099003|16102099003|261009223027099003|5063699009|56012099006|261028144727099003|261022105027099003|261026140227099003|261026121527099003|261026135527099003|261022075727099003|261021121427099003|261021123027099003|261022115727099003; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?BwFtQtUKZ/b0J3+6/d3DNFYQGr0Tu1lO5Chh5uPnk409pulfEGK0kW7tvC6Z?= =?us-ascii?Q?+Aw7pT/Gkv9Fsh4WD9UMhoDi18sn/5mwzAjv5u78dl9X6Kk4aLYR+Jlvn26U?= =?us-ascii?Q?stg8VJeNurt8O3kfzAT1iNl6dD5K3eFbjua82wsu4ysXC/yNMHUXUNNWmSIe?= =?us-ascii?Q?uIdRG4LmKxCqaWNFPTq9RtbPtgPpnwnjroQJMSdKsDYIEy/O5FBxOA5HrOmy?= =?us-ascii?Q?+BiYPK1JuJQ1yYLKqCNo3qUMspP95BvYyu9BUJmSxX1B6IolmBWknrcJFTeT?= =?us-ascii?Q?D5hbycgff+rIaNGcW4lc/xg82F9x0jteiZfQvkpfgsmFQNEfTanJ7SINkrdl?= =?us-ascii?Q?GB/SmQQeFdmd7qXKuRX4YLkaLDJfBV4XgK/jLcYEFw/dwKvZwtwOctmdh2Gj?= =?us-ascii?Q?F4VZooD50xOoIXXbQqseuNFJQ0tX1NTpBn1pGFSbmaqFGiUppYGmhUQwzbhk?= =?us-ascii?Q?lltp/qe5TlRNMtLTSTq+iRQzpR4KhjxPejr5pvkR+1xHALXmA2851O6tMPFk?= =?us-ascii?Q?jYJqGJKatJ9l/gp+ckAFdoDBDQi5WkDr5C6rcU2AL6hMSV3iMW34miqOMcCV?= =?us-ascii?Q?GAimjrJ8jry2EqA1nsdBEsrn9UyyOq2xYxst7vUmlxC8IPpRc7UciL44AxJ2?= =?us-ascii?Q?za/pwhr9O0yVnCncbv70HzrVklNLMx+myy62X0ga5pSi2gjMciLlRTf6MACy?= =?us-ascii?Q?P9mhf1adcNy1/1si+BcBYKeYu65kEbNcsVC5vPwUsqJaXzk2IPbgcayojkbK?= =?us-ascii?Q?bD9oZxaZMNFZQ0ZPR/MDCYuO7ed11kg9paLWtAp7gxQO8Qk3NBvOef1y0zj/?= =?us-ascii?Q?LvtR3RQRzzU8g2+M2D8cfSHvBGgZ6zCTnjcxrVLYEsrbUSxMEgFRRQ8WTNgY?= =?us-ascii?Q?BrREwU0ikG+CrcP44Wq7l96PXTAe/h8LhY6pk+cJXBb063W+QOHTEGXWqbnI?= =?us-ascii?Q?2yH664rs8i5wRBfgXm0InquGsIyZ1DrO6viz6CzyqEROuBsUHyepQaLx9pOY?= =?us-ascii?Q?Tr+741+1r/pyW3EIFUrcDgQ7lQL1P5VEqWzXbQXrLBRb6GQcTHYL6J78+fqI?= =?us-ascii?Q?h1O/O76pazmVx9B9o9r4a+sjl15Pmg=3D=3D?= X-Forefront-Antispam-Report: CIP:2a00:1450:4864:20::329;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail-wm1-x329.google.com;PTR:mail-wm1-x329.google.com;CAT:NONE;SFS:(13230040)(704160211799003)(43022699015)(82310400026)(6059299003)(61400799027)(376014)(48200799018)(9140799003)(6133799003)(10067099003)(22082099003)(261102123227099003)(18056099003)(55112099003)(18002099003)(16102099003)(261009223027099003)(5063699009)(56012099006)(261028144727099003)(261022105027099003)(261026140227099003)(261026121527099003)(261026135527099003)(261022075727099003)(261021121427099003)(261021123027099003)(261022115727099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZS9KqX2HEvry63j5vYgnwvTY6yD/JIemHluzMkEcAwLeaocdiSNsiHUypcDtJ3P2eizPHkgKxbOXf9LPSxhSiqUC7cECmheuVt/s0RGZUR5kuFFo/7hGW4Jzdh7EheFgS29UTOIQP/r46+geQvTMMF6vGbskyx/AC5ThGiiQUFOYEYArdvQse/mHWyui8jvCTCpJ2aycUHy21oHvGg2H7ULyBkpYZTiTi2s99g4N06JQUXdocPcKyCqOSBM/qFtr21Tn3cIsBzDuoJ64uhJQz7adSqb0XaWJr/cEenF3yaBFNPtivlZhOWbHxkzu6sN24sLFEa+PaTmuPXOTnNr5zJuEsqVI0JXoeECGyDDZM7+Q0jBhkS02fT6s3p12wK8ZnjjD263AND2Hzx0Hge/HHs7olPr6i8a9xzDgy6ju/0jibzIPQHUFPcN9y14Bmypz X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-Auto-Response-Suppress: DR, OOF, AutoReply X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2026 14:41:18.8456 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 96977818-8c4d-4f12-6708-08df3a81b010 X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: WA1PEPF00009B39.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8360 List-Id: From: Denis V. Lunev qcow2_reopen_prepare() clears the dirty bit whenever the node is reopened read-only, with an unguarded header write. A read-only node can still be dirty, inherited from an earlier writable session, and it holds no BLK_PERM_WRITE to resolve that. A read-only to read-only reopen of a dirty image therefore fails outright: $ qemu-io -r -f qcow2 dirty.qcow2 <<< $'reopen -r\nquit' qemu-io: failed while preparing to reopen image 'dirty.qcow2' Where the file node below is writable the write is not refused early, and bdrv_co_write_req_prepare() aborts on its BLK_PERM_WRITE assertion instead. Clear it only for a node that is writable now, the predicate qcow2_do_open() already uses for the repair. bdrv_is_writable() also excludes an inactive node, whose header must not be touched either. Signed-off-by: Denis V. Lunev Reviewed-by: Andrey Drobyshev CC: Kevin Wolf CC: Hanna Reitz CC: Andrey Drobyshev Cc: qemu-stable@nongnu.org Message-ID: <20260824133729.1141990-2-den@openvz.org> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf (cherry picked from commit af28b65fae6fcbc22efdbcd4d71b37fd0c8adf89) --- block/qcow2.c | 8 +++--- tests/qemu-iotests/039 | 50 ++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/039.out | 20 +++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 34498078f5e..3e0a219e156 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2190,9 +2190,11 @@ qcow2_reopen_prepare(BDRVReopenState *state,BlockReopenQueue *queue, goto fail; } - ret = qcow2_mark_clean(state->bs); - if (ret < 0) { - goto fail; + if (bdrv_is_writable(state->bs)) { + ret = qcow2_mark_clean(state->bs); + if (ret < 0) { + goto fail; + } } } diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index 94a8bfe754e..3d0c073d65d 100755 --- a/tests/qemu-iotests/039 +++ b/tests/qemu-iotests/039 @@ -95,6 +95,40 @@ $QEMU_IMG info --image-opts \ # The dirty bit must still be set: this open never wrote any guest data _qcow2_dump_header | grep incompatible_features +echo +echo "== Read-only reopen must not clear the dirty bit ==" + +# A read-only node cannot write the header, and must keep the dirty bit +$QEMU_IO -r -c "reopen -r" -c "read -P 0x5a 0 512" "$TEST_IMG" \ + | _filter_qemu_io + +# The dirty bit must still be set +_qcow2_dump_header | grep incompatible_features + +echo +echo "== Read-only reopen must not write through a writable file node ==" + +# The write the header update needs is refused by the permission system +echo "{'execute': 'qmp_capabilities'} + {'execute': 'blockdev-reopen', + 'arguments': {'options': [{'node-name': 'drive', + 'driver': 'qcow2', + 'read-only': true, + 'file': 'prot'}]}} + {'execute': 'quit'}" \ + | $QEMU -qmp stdio -nographic -nodefaults \ + -blockdev "{'node-name': 'prot', + 'driver': 'file', + 'filename': '$TEST_IMG'}" \ + -blockdev "{'node-name': 'drive', + 'driver': 'qcow2', + 'file': 'prot', + 'read-only': true}" \ + | _filter_qmp + +# The dirty bit must still be set +_qcow2_dump_header | grep incompatible_features + echo echo "== Repairing the image file must succeed ==" @@ -108,6 +142,22 @@ echo "== Data should still be accessible after repair ==" $QEMU_IO -c "read -P 0x5a 0 512" "$TEST_IMG" | _filter_qemu_io +echo +echo "== A read-write to read-only reopen must clear the dirty bit ==" + +_make_test_img -o "compat=1.1,lazy_refcounts=on" $size + +# The kill keeps the close from clearing the bit, so the header shows what +# the reopen did with it +_NO_VALGRIND \ +$QEMU_IO -c "write -P 0x5a 0 512" \ + -c "reopen -r" \ + -c "sigraise $(kill -l KILL)" "$TEST_IMG" 2>&1 \ + | _filter_qemu_io + +# The dirty bit must not be set +_qcow2_dump_header | grep incompatible_features + echo echo "== Opening a dirty image read/write should repair it ==" diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out index c66361128f6..ce8ee577216 100644 --- a/tests/qemu-iotests/039.out +++ b/tests/qemu-iotests/039.out @@ -27,6 +27,19 @@ incompatible_features [0] == Read-only open must not crash on close == incompatible_features [0] +== Read-only reopen must not clear the dirty bit == +read 512/512 bytes at offset 0 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +incompatible_features [0] + +== Read-only reopen must not write through a writable file node == +QMP_VERSION +{"return": {}} +{"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} +incompatible_features [0] + == Repairing the image file must succeed == ERROR cluster 5 refcount=0 reference=1 Rebuilding refcount structure @@ -45,6 +58,13 @@ incompatible_features [] read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +== A read-write to read-only reopen must clear the dirty bit == +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +wrote 512/512 bytes at offset 0 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" ) +incompatible_features [] + == Opening a dirty image read/write should repair it == Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 wrote 512/512 bytes at offset 0 -- 2.53.0