block: bugfix: Don't pause vm when NOSPACE EIO happened
When backend disk is FULL and disk IO type is 'dataplane', QEMU will pause the vm, and this may cause endless-loop in QEMU main thread if we do the snapshot merge now. When backend disk is FULL, only reporting an error rather than pausing the virtual machine. Signed-off-by: wangjian161 <wangjian161@huawei.com>
This commit is contained in:
parent
9285ceab91
commit
f9ee5bf0c7
33
block-bugfix-Don-t-pause-vm-when-NOSPACE-EIO-happene.patch
Normal file
33
block-bugfix-Don-t-pause-vm-when-NOSPACE-EIO-happene.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From d0586db311e8b78732923ce46f149fdf8251a59c Mon Sep 17 00:00:00 2001
|
||||||
|
From: WangJian <wangjian161@huawei.com>
|
||||||
|
Date: Wed, 9 Feb 2022 16:10:22 +0800
|
||||||
|
Subject: [PATCH] block: bugfix: Don't pause vm when NOSPACE EIO happened
|
||||||
|
|
||||||
|
When backend disk is FULL and disk IO type is 'dataplane',
|
||||||
|
QEMU will pause the vm, and this may cause endless-loop in
|
||||||
|
QEMU main thread if we do the snapshot merge now.
|
||||||
|
|
||||||
|
When backend disk is FULL, only reporting an error rather
|
||||||
|
than pausing the virtual machine.
|
||||||
|
|
||||||
|
Signed-off-by: wangjian161 <wangjian161@huawei.com>
|
||||||
|
---
|
||||||
|
blockdev.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/blockdev.c b/blockdev.c
|
||||||
|
index 37e3ee6f26..3ce294ec4a 100644
|
||||||
|
--- a/blockdev.c
|
||||||
|
+++ b/blockdev.c
|
||||||
|
@@ -556,7 +556,7 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts,
|
||||||
|
qdict_put_str(bs_opts, "driver", buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
- on_write_error = BLOCKDEV_ON_ERROR_ENOSPC;
|
||||||
|
+ on_write_error = BLOCKDEV_ON_ERROR_REPORT;
|
||||||
|
if ((buf = qemu_opt_get(opts, "werror")) != NULL) {
|
||||||
|
on_write_error = parse_block_error_action(buf, 0, &error);
|
||||||
|
if (error) {
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user