[Devel] [PATCH hci-8.2 v2 3/7] dm-qcow2: drop the WARN on a read failing with ENOSPC
Alexander Ivanov
alexander.ivanov at virtuozzo.com
Mon Nov 30 19:24:52 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
the file system may return it for a read: vstorage kio, in
ioreq_complete(), turns PCS_REQ_F_NOSPACE into -ENOSPC for any request
type, reads included. A WARN on an error of the lower file system
takes the node down with panic_on_warn.
12ab90fbc953 ("dm-qcow2: fix WARN in qrq_endio() on flush failing with
ENOSPC") let only flushes through, assuming reads never see ENOSPC.
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 0c4fe1ae767c..bfbfe7b47c90 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -4722,12 +4722,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