Merge tag 'pull-nbd-2026-10-08-v4' of https://gitlab.com/ebblake/qemu into staging

NBD patches through 2026-10-08

Several fixes, including:
- Eric Blake: Update MAINTAINERS, support qemu-nbd -s -l
- Fiona Ebner: Report flush error on qemu-img convert
- Denis V. Lunev: Fix postcopy dirty bitmap migration
- Eric Farman: Several iotest improvements

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmrSQYoACgkQp6FrSiUn
# Q2qilAf/eEx7WDxnMW9/xNQ0xwFCJFfcwF7alPfORNS/tTQk+a1CpvvXVXqWNGc1
# JIBQQtCbBteGh6QOlHE1uedZpeURgWluaOa3ZOmjWoB8xCo9iIz66lvMmV4+OaJM
# iTn1ExR/rFGFoNu73S5+Zbusc3znWrClZmYIw1XPfM3pgol8HIz68q284oqkkMQ+
# ddo1GnWbsZKd1e+90A0mZTFrqFEcUZiVaUbY+NCxo/OYFUwNGSxg/+QMIASJbv6H
# zDUrs1+oC1d0qiaM8Rg6/V4dgfSsgxd4t0k+h5r1mJIQT9spevz6/2R44bAinPso
# Mirbenl/KVOk30lvNAiQRRta8KsTVQ==
# =iDnD
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 16 Oct 2026 05:23:54 PM CEST
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [unknown]
# gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [unknown]
# gpg:                 aka "[jpeg image of size 6874]" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* tag 'pull-nbd-2026-10-08-v4' of https://gitlab.com/ebblake/qemu:
  iotests/iothreads-nbd-export: Skip on s390
  iotests/fuse-truncate: skip if FUSE is not usable
  iotests/nbd-tls-iothread: skip on non-x86 hardware
  iotests/nbd-in-qcow2-chain: use default machine
  iotests/migrate-bitmaps-postcopy-test: add a bitmap on a second node
  migration/block-dirty-bitmap: fix postcopy abort with bitmaps on several nodes
  migration: add QEMU_COUNTED_STRING_SIZE for counted string buffers
  qemu-img: convert: flush target image after copying
  block: report flush error during bdrv_close()
  iotests.py: add filter_qemu()
  iotests: add test cases for failing flush after qemu-img convert
  qemu-nbd: Support -s and -l at the same time
  maint: Update eblake's staging repo

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson committed 2026-10-19 10:54:44 +02:00
commit 288b6c9e78
30 files changed
+427 -33

No files matched your search

+2 -2
View File
@@ -3393,7 +3393,7 @@ F: migration/block-dirty-bitmap.c
F: util/hbitmap.c
F: tests/unit/test-hbitmap.c
F: docs/interop/bitmaps.rst
T: git https://repo.or.cz/qemu/ericb.git bitmaps
T: git https://gitlab.com/ebblake/qemu.git bitmaps
T: git https://gitlab.com/vsementsov/qemu.git block
Character device backends
@@ -4392,7 +4392,7 @@ F: blockdev-nbd.c
F: docs/interop/nbd.rst
F: docs/tools/qemu-nbd.rst
F: tests/qemu-iotests/tests/*nbd*
T: git https://repo.or.cz/qemu/ericb.git nbd
T: git https://gitlab.com/ebblake/qemu.git nbd
T: git https://gitlab.com/vsementsov/qemu.git block
NFS
+12 -1
View File
@@ -5174,12 +5174,23 @@ static void GRAPH_UNLOCKED bdrv_close(BlockDriverState *bs)
{
BdrvAioNotifier *ban, *ban_next;
BdrvChild *child, *next;
int ret;
GLOBAL_STATE_CODE();
assert(!bs->refcnt);
bdrv_drained_begin(bs); /* complete I/O */
bdrv_flush(bs);
ret = bdrv_flush(bs);
if (ret < 0) {
const char *name;
if (bs->filename[0]) {
name = bs->filename;
} else {
name = bdrv_get_node_name(bs);
}
error_report("Failed flush for '%s' during close: %s", name,
strerror(-ret));
}
bdrv_drain(bs); /* in case flush left pending I/O */
if (bs->drv) {
+4 -3
View File
@@ -95,9 +95,10 @@ driver options if :option:`--image-opts` is specified.
.. option:: -l, --load-snapshot=SNAPSHOT_PARAM
Load an internal snapshot inside *filename* and export it
as an read-only device, SNAPSHOT_PARAM format is
``snapshot.id=[ID],snapshot.name=[NAME]`` or ``[ID_OR_NAME]``
Load an internal snapshot inside *filename* and export it.
SNAPSHOT_PARAM format is ``snapshot.id=[ID],snapshot.name=[NAME]``
or ``[ID_OR_NAME]``. The export is read-only unless ``-s`` is also
in use.
.. option:: --cache=CACHE
+5 -1
View File
@@ -163,7 +163,11 @@ static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv)
qemu_get_be64s(f, (uint64_t *)pv);
}
size_t coroutine_mixed_fn qemu_get_counted_string(QEMUFile *f, char buf[256]);
/* Buffer size for a string whose length is sent as a single byte */
#define QEMU_COUNTED_STRING_SIZE 256
size_t coroutine_mixed_fn
qemu_get_counted_string(QEMUFile *f, char buf[QEMU_COUNTED_STRING_SIZE]);
void qemu_put_counted_string(QEMUFile *f, const char *name);
+56 -6
View File
@@ -140,13 +140,14 @@ typedef struct LoadBitmapState {
BdrvDirtyBitmap *bitmap;
bool migrated;
bool enabled;
char node_alias[QEMU_COUNTED_STRING_SIZE];
} LoadBitmapState;
/* State of the dirty bitmap migration (DBM) during load process */
typedef struct DBMLoadState {
uint32_t flags;
char node_alias[256];
char bitmap_alias[256];
char node_alias[QEMU_COUNTED_STRING_SIZE];
char bitmap_alias[QEMU_COUNTED_STRING_SIZE];
char bitmap_name[BDRV_BITMAP_MAX_NAME_SIZE + 1];
BlockDriverState *bs;
BdrvDirtyBitmap *bitmap;
@@ -859,6 +860,7 @@ static int dirty_bitmap_load_start(QEMUFile *f, DBMLoadState *s)
}
b = g_new(LoadBitmapState, 1);
g_strlcpy(b->node_alias, s->node_alias, sizeof(b->node_alias));
b->bs = s->bs;
b->bitmap = s->bitmap;
b->migrated = false;
@@ -1056,6 +1058,53 @@ static int dirty_bitmap_load_bits(QEMUFile *f, DBMLoadState *s)
return 0;
}
/*
* Only START chunks are guaranteed to be loaded under the BQL; the rest may
* come from the postcopy listen thread and must not touch the block graph.
*/
static BlockDriverState *dirty_bitmap_load_find_bs(DBMLoadState *s,
const char *device,
const char *node_name,
Error **errp)
{
GSList *item;
if (s->flags & DIRTY_BITMAP_MIG_FLAG_START) {
return bdrv_lookup_bs(device, node_name, errp);
}
for (item = s->bitmaps; item; item = g_slist_next(item)) {
LoadBitmapState *b = item->data;
if (!strcmp(b->node_alias, s->node_alias)) {
return b->bs;
}
}
error_setg(errp, "no migrated bitmaps on node alias '%s'", s->node_alias);
return NULL;
}
static BdrvDirtyBitmap *dirty_bitmap_load_find_bitmap(DBMLoadState *s)
{
GSList *item;
if (s->flags & DIRTY_BITMAP_MIG_FLAG_START) {
return bdrv_find_dirty_bitmap(s->bs, s->bitmap_name);
}
for (item = s->bitmaps; item; item = g_slist_next(item)) {
LoadBitmapState *b = item->data;
if (b->bs == s->bs &&
!strcmp(bdrv_dirty_bitmap_name(b->bitmap), s->bitmap_name)) {
return b->bitmap;
}
}
return NULL;
}
static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,
GHashTable *alias_map)
{
@@ -1084,11 +1133,12 @@ static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,
s->bs = NULL;
} else {
bitmap_alias_map = amin->subtree;
s->bs = bdrv_lookup_bs(NULL, amin->string, &local_err);
s->bs = dirty_bitmap_load_find_bs(s, NULL, amin->string,
&local_err);
}
} else {
s->bs = bdrv_lookup_bs(s->node_alias, s->node_alias,
&local_err);
s->bs = dirty_bitmap_load_find_bs(s, s->node_alias,
s->node_alias, &local_err);
}
if (!s->bs) {
error_report_err(local_err);
@@ -1139,7 +1189,7 @@ static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,
if (!s->cancelled) {
g_strlcpy(s->bitmap_name, bitmap_name, sizeof(s->bitmap_name));
s->bitmap = bdrv_find_dirty_bitmap(s->bs, s->bitmap_name);
s->bitmap = dirty_bitmap_load_find_bitmap(s);
/*
* bitmap may be NULL here, it wouldn't be an error if it is the
+3 -2
View File
@@ -829,7 +829,8 @@ uint64_t qemu_get_be64(QEMUFile *f)
* else 0
* (Note a 0 length string will return 0 either way)
*/
size_t coroutine_mixed_fn qemu_get_counted_string(QEMUFile *f, char buf[256])
size_t coroutine_mixed_fn
qemu_get_counted_string(QEMUFile *f, char buf[QEMU_COUNTED_STRING_SIZE])
{
size_t len = qemu_get_byte(f);
size_t res = qemu_get_buffer(f, (uint8_t *)buf, len);
@@ -847,7 +848,7 @@ void qemu_put_counted_string(QEMUFile *f, const char *str)
{
size_t len = strlen(str);
assert(len < 256);
assert(len < QEMU_COUNTED_STRING_SIZE);
qemu_put_byte(f, len);
qemu_put_buffer(f, (const uint8_t *)str, len);
}
+7 -1
View File
@@ -2245,7 +2245,7 @@ static int img_convert(const img_cmd_t *ccmd, int argc, char **argv)
Error *local_err = NULL;
bool writethrough, src_writethrough, image_opts = false,
skip_create = false, progress = false, tgt_image_opts = false;
int64_t ret = -EINVAL;
int64_t ret = -EINVAL, ret2;
bool force_share = false;
bool explict_min_sparse = false;
bool bitmaps = false;
@@ -2872,6 +2872,12 @@ static int img_convert(const img_cmd_t *ccmd, int argc, char **argv)
ret = convert_copy_bitmaps(blk_bs(s.src[0]), out_bs, skip_broken);
}
ret2 = blk_flush(s.target);
if (ret2 < 0) {
error_report("Failed to flush target image: %s", strerror(-ret2));
ret = ret != 0 ? ret : ret2;
}
out:
if (!ret) {
qemu_progress_print(100, 0);
+19 -3
View File
@@ -534,6 +534,7 @@ int main(int argc, char **argv)
{
BlockBackend *blk;
BlockDriverState *bs;
BlockDriverState *orig_bs;
uint64_t dev_offset = 0;
bool readonly = false;
bool disconnect = false;
@@ -716,7 +717,7 @@ int main(int argc, char **argv)
} else {
sn_id_or_name = optarg;
}
/* fall through */
break;
case 'r':
readonly = true;
flags &= ~BDRV_O_RDWR;
@@ -1110,6 +1111,15 @@ int main(int argc, char **argv)
bdrv_init();
atexit(qemu_nbd_shutdown);
/*
* -s and -l can be used together to create read-write wrapper
* around an internal snapshot. Otherwise, -l in isolation implies
* read-only.
*/
if ((sn_opts || sn_id_or_name) && (flags & BDRV_O_SNAPSHOT) == 0) {
readonly = true;
flags &= ~BDRV_O_RDWR;
}
opts.srcpath = argv[optind];
if (imageOpts) {
QemuOpts *o;
@@ -1155,13 +1165,19 @@ int main(int argc, char **argv)
blk_set_enable_write_cache(blk, !writethrough);
orig_bs = bs;
if (flags & BDRV_O_SNAPSHOT) {
WITH_GRAPH_RDLOCK_GUARD() {
orig_bs = bs->backing->bs;
}
}
if (sn_opts) {
ret = bdrv_snapshot_load_tmp(bs,
ret = bdrv_snapshot_load_tmp(orig_bs,
qemu_opt_get(sn_opts, SNAPSHOT_OPT_ID),
qemu_opt_get(sn_opts, SNAPSHOT_OPT_NAME),
&local_err);
} else if (sn_id_or_name) {
ret = bdrv_snapshot_load_tmp_by_id_or_name(bs, sn_id_or_name,
ret = bdrv_snapshot_load_tmp_by_id_or_name(orig_bs, sn_id_or_name,
&local_err);
}
if (ret < 0) {
+5 -5
View File
@@ -101,13 +101,13 @@ if [ "$event" == "l2_update" ]; then
$QEMU_IO -c "write $vmstate 0 512" "$TEST_IMG" > /dev/null 2>&1
fi
$QEMU_IO -c "write $vmstate 0 128k " "$BLKDBG_TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "write $vmstate 0 128k " "$BLKDBG_TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir
# l2_load is not called on allocation, so issue a second write
# Reads are another path to trigger l2_load, so do a read, too
if [ "$event" == "l2_load" ]; then
$QEMU_IO -c "write $vmstate 0 128k " "$BLKDBG_TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "read $vmstate 0 128k " "$BLKDBG_TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "write $vmstate 0 128k " "$BLKDBG_TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir
$QEMU_IO -c "read $vmstate 0 128k " "$BLKDBG_TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir
fi
_check_test_img_ignore_leaks 2>&1 | grep -v "refcount=1 reference=0"
@@ -153,7 +153,7 @@ _make_test_img 1G
echo
echo "Event: $event; errno: $errno; imm: $imm; once: $once; write $vmstate"
$QEMU_IO -c "write $vmstate 0 64M" "$BLKDBG_TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "write $vmstate 0 64M" "$BLKDBG_TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir
_check_test_img_ignore_leaks 2>&1 | grep -v "refcount=1 reference=0"
@@ -192,7 +192,7 @@ _make_test_img 1G
echo
echo "Event: $event; errno: $errno; imm: $imm; once: $once"
$QEMU_IO -c "write -b 0 64k" "$BLKDBG_TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "write -b 0 64k" "$BLKDBG_TEST_IMG" 2>&1 | _filter_qemu_io | _filter_testdir
_check_test_img_ignore_leaks 2>&1 | grep -v "refcount=1 reference=0"
+84
View File
@@ -15,15 +15,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -39,15 +43,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_update; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -127,15 +135,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -151,15 +163,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_update; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -175,15 +191,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -199,15 +219,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l2_alloc_write; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -223,15 +247,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -247,15 +275,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: write_aio; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -271,15 +303,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -295,15 +331,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_load; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -319,15 +359,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -343,15 +387,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_update_part; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -367,15 +415,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 5; imm: off; once: off; write
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 5; imm: off; once: off; write -b
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -391,15 +443,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -458,15 +514,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -482,15 +542,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -506,15 +570,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -530,15 +598,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -554,15 +626,19 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write -b
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
=== L1 growth tests ===
@@ -596,8 +672,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_write_table; errno: 5; imm: off; once: off
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -608,8 +686,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_write_table; errno: 28; imm: off; once: off
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -620,8 +700,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_activate_table; errno: 5; imm: off; once: off
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
qemu-io: Failed to flush the L2 table cache: Input/output error
qemu-io: Failed to flush the refcount block cache: Input/output error
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: Input/output error
No errors were found on the image.
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
@@ -632,8 +714,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
Event: l1_grow_activate_table; errno: 28; imm: off; once: off
qemu-io: write failed: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
qemu-io: Failed to flush the L2 table cache: No space left on device
qemu-io: Failed to flush the refcount block cache: No space left on device
qemu-io: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.qcow2' during close: No space left on device
No errors were found on the image.
=== Avoid cluster leaks after temporary failure ===
+1 -1
View File
@@ -52,7 +52,7 @@ do_run_qemu()
run_qemu()
{
do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp | _filter_qemu_io
do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp | _filter_qemu_io | _filter_json_filename
}
IMG_SIZE=64M
+2
View File
@@ -83,8 +83,10 @@ wrote 512/512 bytes at offset 0
{"return": ""}
{"return": "Error: read failed: Input/output error\r\n"}
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
QEMU_PROG: Failed flush for 'json:{ /* filtered */ }' during close: Input/output error
QEMU_PROG: Failed to flush the L2 table cache: Input/output error
QEMU_PROG: Failed to flush the refcount block cache: Input/output error
QEMU_PROG: Failed flush for 'json:{ /* filtered */ }' during close: Input/output error
{"return": {}}
*** done
+2
View File
@@ -67,6 +67,7 @@ qemu-img: Failed to load snapshot: Snapshot L1 table offset invalid
qemu-img: Snapshot L1 table offset invalid
qemu-img: Failed to turn zero into data clusters: Invalid argument
qemu-io: write failed: Invalid argument
qemu-io: Failed flush for 'TEST_DIR/t.qcow2' during close: Invalid argument
qemu-io: Failed to flush the refcount block cache: Invalid argument
qemu-img: Snapshot L1 table offset invalid
qemu-img: Could not apply snapshot 'test': Failed to load snapshot: Invalid argument
@@ -90,6 +91,7 @@ qemu-img: Failed to load snapshot: Snapshot L1 table too large
qemu-img: Snapshot L1 table too large
qemu-img: Failed to turn zero into data clusters: File too large
qemu-io: write failed: File too large
qemu-io: Failed flush for 'TEST_DIR/t.qcow2' during close: File too large
qemu-io: Failed to flush the refcount block cache: File too large
qemu-img: Snapshot L1 table too large
qemu-img: Could not apply snapshot 'test': Failed to load snapshot: File too large
+4
View File
@@ -6,6 +6,7 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-img: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT' during close: Input/output error
qemu-img: Failed to empty blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
No errors were found on the image.
@@ -15,6 +16,7 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-img: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT' during close: Input/output error
qemu-img: Failed to empty blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
Leaked cluster 4 refcount=1 reference=0
Leaked cluster 5 refcount=1 reference=0
@@ -28,6 +30,7 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-img: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT' during close: Input/output error
qemu-img: Failed to empty blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
@@ -42,6 +45,7 @@ Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=67108864
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
wrote 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-img: Failed flush for 'blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT' during close: Input/output error
qemu-img: Failed to empty blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT: Input/output error
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 1 refcount=0 reference=1
+33
View File
@@ -332,6 +332,39 @@ echo
$QEMU_IMG convert -O $IMGFMT -o preallocation=metadata -n \
"$TEST_IMG" "$TEST_IMG".orig && echo "unexpected success"
echo
echo "=== failing flush after convert with default ('unsafe') cache mode ==="
echo
TEST_IMG="$TEST_IMG".orig _make_test_img 1M
TEST_IMG="$TEST_IMG" _make_test_img 1M
$QEMU_IO -c "write -P 42 0 1M" "$TEST_IMG".orig | _filter_qemu_io
target_fails_flush="json:{
'driver': '$IMGFMT',
'file': {
'driver': 'blkdebug',
'inject-error': [{
'event': 'flush_to_disk'
}],
'image': {
'driver': 'file',
'filename': '$TEST_IMG'
}
}
}"
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n "$TEST_IMG".orig "$target_fails_flush" 2>&1 | _filter_json_filename
echo "qemu-img convert exited with status ${PIPESTATUS[0]}"
echo
echo "=== failing flush after convert with 'writeback' cache mode ==="
echo
$QEMU_IMG convert -t writeback -f $IMGFMT -O $IMGFMT -n "$TEST_IMG".orig "$target_fails_flush" 2>&1 | _filter_json_filename
echo "qemu-img convert exited with status ${PIPESTATUS[0]}"
# success, all done
echo '*** done'
rm -f $seq.full
+17
View File
@@ -256,4 +256,21 @@ Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=67108864
=== -n incompatible with -o ===
qemu-img: -o has no effect when skipping image creation
=== failing flush after convert with default ('unsafe') cache mode ===
Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=1048576
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-img convert exited with status 0
=== failing flush after convert with 'writeback' cache mode ===
qemu-img: Failed to flush target image: Input/output error
qemu-img: Failed flush for 'json:{ /* filtered */ }' during close: Input/output error
qemu-img: Failed to flush the L2 table cache: Input/output error
qemu-img: Failed to flush the refcount block cache: Input/output error
qemu-img: Failed flush for 'json:{ /* filtered */ }' during close: Input/output error
qemu-img convert exited with status 1
*** done
+1 -1
View File
@@ -262,7 +262,7 @@ $QEMU_IO -c 'write 0 512' -c flush \
}
}
}" \
| _filter_qemu_io
2>&1 | _filter_qemu_io | _filter_generated_node_ids
result=${PIPESTATUS[0]}
echo
+1
View File
@@ -134,6 +134,7 @@ Images are identical.
=== Flushing should flush the data file ===
qemu-io: Failed flush for 'NODE_NAME' during close: Input/output error
wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+4
View File
@@ -596,6 +596,10 @@ def filter_qemu_io(msg):
return qemu_io_re.sub("X ops; XX:XX:XX.X "
"(XXX YYY/sec and XXX ops/sec)", msg)
qemu_re = re.compile(r"%s" % os.path.basename(qemu_prog))
def filter_qemu(msg):
return qemu_re.sub("QEMU_PROG", msg)
chown_re = re.compile(r"chown [0-9]+:[0-9]+")
def filter_chown(msg):
return chown_re.sub("chown UID:GID", msg)
+1 -1
View File
@@ -94,7 +94,7 @@ echo "$output"
echo
# This should fail, but gracefully, i.e. just print an I/O error, not crash.
$QEMU_IO -f file -c 'write 0 64M' "$TEST_DIR/fuse-export" | _filter_qemu_io
$QEMU_IO -f file -c 'write 0 64M' "$TEST_DIR/fuse-export" 2>&1 | _filter_qemu_io | _filter_testdir
echo
capture_events=BLOCK_EXPORT_DELETED _send_qemu_cmd $QEMU_HANDLE \
@@ -22,6 +22,7 @@ QA output created by file-io-error
{"return": {}}
qemu-io: write failed: Input/output error
qemu-io: Failed flush for 'TEST_DIR/fuse-export' during close: Input/output error
{'execute': 'block-export-del',
'arguments': {'id': 'exp0'}}
@@ -29,5 +30,6 @@ qemu-io: write failed: Input/output error
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "exp0"}}
{'execute': 'blockdev-del',
'arguments': {'node-name': 'node0'}}
QEMU_PROG: Failed flush for 'node0' during close: Input/output error
{"return": {}}
*** done
+6 -3
View File
@@ -32,9 +32,12 @@ def check_fuse_support():
test_qsd.stop()
os.remove(fuse_mount_point)
if 'error' in res:
assert (res['error']['desc'] ==
"Parameter 'type' does not accept value 'fuse'")
iotests.notrun('No FUSE support')
desc = res['error']['desc']
if desc == "Parameter 'type' does not accept value 'fuse'":
iotests.notrun('No FUSE support')
if 'Failed to mount FUSE session' in desc:
iotests.notrun('FUSE not usable in this environment')
assert False, desc
def check_sudo_support():
try:
@@ -25,6 +25,11 @@ import iotests
iotests.script_initialize(supported_fmts=['qcow2'],
supported_platforms=['linux'])
# QEMU on s390 will exit without any sort of backing disk,
# so the reset loop requested by this test will fail.
if iotests.qemu_default_machine == 's390-ccw-virtio':
iotests.notrun('Cannot run test on s390')
with iotests.FilePath('disk1.img') as path, \
iotests.FilePath('nbd.sock', base_dir=iotests.sock_dir) as nbd_sock, \
qemu.machine.QEMUMachine(iotests.qemu_prog) as vm:
@@ -27,6 +27,8 @@ debug = False
disk_a = os.path.join(iotests.test_dir, 'disk_a')
disk_b = os.path.join(iotests.test_dir, 'disk_b')
disk_a1 = os.path.join(iotests.test_dir, 'disk_a1')
disk_b1 = os.path.join(iotests.test_dir, 'disk_b1')
size = '256G'
fifo = os.path.join(iotests.test_dir, 'mig_fifo')
@@ -97,16 +99,26 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
self.vm_b.shutdown()
os.remove(disk_a)
os.remove(disk_b)
os.remove(disk_a1)
os.remove(disk_b1)
os.remove(fifo)
def setUp(self):
if os.path.exists(fifo):
os.remove(fifo)
os.mkfifo(fifo)
qemu_img('create', '-f', iotests.imgfmt, disk_a, size)
qemu_img('create', '-f', iotests.imgfmt, disk_b, size)
qemu_img('create', '-f', iotests.imgfmt, disk_a1, '1G')
qemu_img('create', '-f', iotests.imgfmt, disk_b1, '1G')
self.vm_a = iotests.VM(path_suffix='a').add_drive(disk_a,
'discard=unmap')
self.vm_b = iotests.VM(path_suffix='b').add_drive(disk_b,
'discard=unmap')
self.drive1_sha256 = ""
# A bitmap on a second node makes postcopy switch nodes after setup
self.vm_a.add_drive(disk_a1)
self.vm_b.add_drive(disk_b1)
self.vm_b.add_incoming("exec: cat '" + fifo + "'")
self.vm_a.launch()
self.vm_b.launch()
@@ -127,6 +139,13 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
node='drive0', name='bitmap0')
empty_sha256 = result['return']['sha256']
self.vm_a.cmd('block-dirty-bitmap-add', node='drive1',
name='bitmap0', granularity=granularity)
self.vm_a.hmp_qemu_io('drive1', 'write 0 64k')
result = self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256',
node='drive1', name='bitmap0')
self.drive1_sha256 = result['return']['sha256']
apply_discards(self.vm_a, discards1)
result = self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256',
@@ -212,6 +231,9 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase):
# check that bitmaps are migrated and persistence works
check_bitmaps(self.vm_b, nb_bitmaps)
result = self.vm_b.qmp('x-debug-block-dirty-bitmap-sha256',
node='drive1', name='bitmap0')
self.assert_qmp(result, 'return/sha256', self.drive1_sha256)
self.vm_b.shutdown()
# recreate vm_b, so there is no incoming option, which prevents
# loading bitmaps from disk
+1 -1
View File
@@ -41,7 +41,7 @@ TEST_IMG="$TEST_IMG.base" _make_test_img $size
echo
echo "=== Starting QEMU and exposing base image ==="
_launch_qemu -machine q35
_launch_qemu
h1=$QEMU_HANDLE
_send_qemu_cmd $QEMU_HANDLE '{"execute": "qmp_capabilities"}' 'return'
_send_qemu_cmd $QEMU_HANDLE '{"execute": "blockdev-add",
@@ -45,6 +45,10 @@ cd ..
_supported_fmt qcow2 # Hardcoded to qcow2 command line and QMP below
_supported_proto file
if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then
_notrun "Requires a PC machine"
fi
# pick_unused_port
#
# Picks and returns an "unused" port, setting the global variable
+81
View File
@@ -0,0 +1,81 @@
#!/usr/bin/env bash
# group: rw quick
#
# Test qemu-nbd snapshot handling
#
# Copyright (C) Red Hat, Inc.
#
# SPDX-License-Identifier: GPL-2.0-or-later
seq="$(basename $0)"
echo "QA output created by $seq"
status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
nbd_server_stop
}
trap "_cleanup; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
cd ..
. ./common.rc
. ./common.filter
. ./common.nbd
_supported_fmt qcow2
_supported_proto file
_supported_os Linux
_require_command QEMU_NBD
echo
echo "=== Initial image setup ==="
echo
# Create qcow2 image with one internal snapshot
_make_test_img 10M
$QEMU_IO -c 'w -P 1 3M 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
$QEMU_IMG snapshot -c snap -f $IMGFMT "$TEST_IMG" | _filter_qemu_img
$QEMU_IO -c 'w -P 2 3M 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
echo
echo "=== Main image in snapshot mode ==="
echo
nbd_server_start_unix_socket -s -f qcow2 "$TEST_IMG"
$QEMU_IO -c 'r -P 2 3M 1M' -c 'w -P 3 3M 1M' -c 'r -P 3 3M 1M' -f raw \
nbd:unix:$nbd_unix_socket | _filter_qemu_io
nbd_server_stop
echo
echo "=== Read-only snapshot access ==="
echo
nbd_server_start_unix_socket -l snap -f qcow2 "$TEST_IMG"
$QEMU_IO -r -c 'r -P 1 3M 1M' -f raw \
nbd:unix:$nbd_unix_socket | _filter_qemu_io
$QEMU_IO -c 'r -P 1 3M 1M' -f raw \
nbd:unix:$nbd_unix_socket 2>&1 | _filter_qemu_io | _filter_testdir
nbd_server_stop
echo
echo "=== Combine -s and -l for read-write internal snapshot access ==="
echo
nbd_server_start_unix_socket -s -l snap -f qcow2 "$TEST_IMG"
$QEMU_IO -c 'r -P 1 3M 1M' -c 'w -P 3 3M 1M' -c 'r -P 3 3M 1M' -f raw \
nbd:unix:$nbd_unix_socket | _filter_qemu_io
nbd_server_stop
echo
echo "=== Check that original image is unchanged ==="
echo
$QEMU_IO -c 'r -P 2 3M 1M' -f $IMGFMT "$TEST_IMG" | _filter_qemu_io
# success, all done
echo '*** done'
rm -f $seq.full
status=0
@@ -0,0 +1,39 @@
QA output created by qemu-nbd-snapshots
=== Initial image setup ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760
wrote 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
=== Main image in snapshot mode ===
read 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
=== Read-only snapshot access ===
read 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
qemu-io: can't open device nbd:unix:SOCK_DIR/qemu-nbd.sock: Could not open image: Permission denied
=== Combine -s and -l for read-write internal snapshot access ===
read 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
=== Check that original image is unchanged ===
read 1048576/1048576 bytes at offset 3145728
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
*** done
+3 -2
View File
@@ -20,7 +20,7 @@
import iotests
from iotests import filter_qemu_io, filter_qtest
from iotests import filter_qemu, filter_qemu_io, filter_qtest
iotests.script_initialize(supported_fmts=['qcow2', 'qed', 'raw'],
supported_protocols=['file'],
@@ -126,11 +126,12 @@ with iotests.FilePath('disk.img') as path, \
iotests.log('\nDone')
# NOTE: Flush during close fails here, since the QSD node was inactivated.
vm_src.shutdown()
iotests.log('\n--- vm_src log ---')
log = vm_src.get_log()
if log:
iotests.log(log, [filter_qtest, filter_qemu_io])
iotests.log(log, [filter_qtest, filter_qemu_io, filter_qemu])
qsd_src.stop()
vm_dst.shutdown()
+1
View File
@@ -47,6 +47,7 @@ read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
QEMU_PROG: Failed flush for 'disk' during close: Operation not permitted
--- vm_dst log ---
read 4096/4096 bytes at offset 0