[Devel] [PATCH hci-8.2 3/7] dm-qcow2: drop the WARN on a read failing with ENOSPC

Alexander Ivanov alexander.ivanov at virtuozzo.com
Fri Nov 27 14:15:46 MSK 2026


qrq_endio() warns when a request other than a write or a flush fails
with ENOSPC. But the error comes from the image file's read_iter, and
a FUSE server may return ENOSPC for a read. A WARN on an error of the
lower file system takes the node down with panic_on_warn.

Such a read is still delayed and retried, as before.

https://virtuozzo.atlassian.net/browse/VSTOR-152175

Fixes: 6e2ec304689f ("dm-qcow2: Pause IO and notify about ENOSPC events")
Feature: dm-qcow2: block device over QCOW2 files driver
Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>
---
 drivers/md/dm-qcow2-map.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index 9c955bb54de8..dfda7fe8bb8e 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -4667,12 +4667,9 @@ static void qrq_endio(struct qcow2_target *tgt, struct qio *qio,
 	 * timeout. Note, that we do not handle merge here: merge
 	 * callers receive -ENOSPC synchronous without intermediaries.
 	 */
-	if (unlikely(bi_status == BLK_STS_NOSPC)) {
-		WARN_ON_ONCE(!op_is_write(qio->bi_op) &&
-			     qio->bi_op != REQ_OP_FLUSH);
-		if (qcow2_try_delay_enospc(tgt, qrq, qio))
-			return;
-	}
+	if (unlikely(bi_status == BLK_STS_NOSPC) &&
+	    qcow2_try_delay_enospc(tgt, qrq, qio))
+		return;
 
 	mempool_free(qrq, tgt->qrq_pool);
 	dm_complete_request(rq, bi_status);
-- 
2.53.0



More information about the Devel mailing list