Skip to contentSkip to conversation

Block layer patches

GIT PULL Applied Kevin Wolf 2 participants 23 messages Oct 7 – Oct 9 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

The following changes since commit f9587d4045c67cd0d8d8bdcd5d0bb5b6b395b63c:

Merge tag 'pbouvier/pr/plugins-20261005' of https://gitlab.com/p-b-o/qemu into staging (2026-10-06 11:26:40 +0200)

are available in the Git repository at:

https://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to cf4f672c11d663f87462cfd99a92124b30804e99:

block: Remove now redundant bdrv_wait_serialising_requests() calls (2026-10-07 18:00:36 +0200)

----------------------------------------------------------------
Block layer patches

- Fix corruption from broken RMW atomicity
- Fix bdrv_next() skipping monitor-owned nodes
- fdc: Account for read and write requests
- throttle-groups: Fix crash when enabling I/O limits on a busy disk
- file-posix: Fixed O_DIRECT alignment for truncate requests
- file-posix: add statx(STATX_DIOALIGN) support
- qcow2: (Partially) fix reopen for read-only nodes
- scripts/qemugdb: Fixes for 'qemu bt' / 'qemu coroutine' commands
- Code cleanup

----------------------------------------------------------------
Andrey Drobyshev (10):
block: allocate aligned write buffer for 'truncate -m full' scripts/qemugdb: coroutine: Fix selected frame leak on error path scripts/qemugdb: coroutine: Get rid of fallback pattern when dumping backtrace scripts/qemugdb: coroutine: Only attempt to restore regs in coredump scripts/qemugdb: coroutine: Don't unwind past the outermost frame scripts/qemugdb: coroutine: Fix patching pt_regs in the coredump scripts/qemugdb: coroutine: Fix '--detailed' description scripts/qemugdb: coroutine: Handle target absence gracefully scripts/qemugdb: coroutine: Speed up coroutine lookup in a coredump scripts/qemugdb: coroutine: Don't touch the coredump for a plain backtrace

Christian Quante (1):
hw/block/fdc: account for read and write requests

Daniel P. Berrangé (1):
iotests: remove unused 'owner=' variable assignment

Denis V. Lunev (5):
block-common: fix BDRV_WANT_PRECISE duplicating BDRV_WANT_OFFSET_VALID block/throttle-groups: fix crash when enabling I/O limits on a busy disk
block: fix bdrv_next() skipping monitor-owned nodes
qcow2: do not clear the dirty bit when reopening a read-only node
block: reject a reopen of an unusable node instead of crashing

Kevin Wolf (2):
block: Fix corruption from broken RMW atomicity
block: Remove now redundant bdrv_wait_serialising_requests() calls

Stefan Hajnoczi (1):
file-posix: add statx(STATX_DIOALIGN) support

Tim Pambor (1):
iotests: annotate TestRunner.shared_self for mypy 2.4

 include/block/block-common.h                       |   2 +-
 include/block/block_int-common.h                   |   1 +
 block.c                                            |  14 ++-
 block/block-backend.c                              |  13 +-
 block/file-posix.c                                 |  61 ++++++----
 block/io.c                                         |  42 ++++---
 block/qcow2.c                                      |   8 +-
 block/throttle-groups.c                            |   4 +-
 hw/block/fdc.c                                     |  52 ++++++--
 scripts/qemugdb/coroutine.py                       | 135 +++++++++++++--------
 tests/qemu-iotests/testrunner.py                   |   2 +-
 tests/qemu-iotests/001                             |   2 -
 tests/qemu-iotests/002                             |   2 -
 tests/qemu-iotests/003                             |   2 -
 tests/qemu-iotests/004                             |   2 -
 tests/qemu-iotests/005                             |   2 -
 tests/qemu-iotests/007                             |   2 -
 tests/qemu-iotests/008                             |   2 -
 tests/qemu-iotests/009                             |   2 -
 tests/qemu-iotests/010                             |   2 -
 tests/qemu-iotests/011                             |   2 -
 tests/qemu-iotests/012                             |   2 -
 tests/qemu-iotests/013                             |   2 -
 tests/qemu-iotests/014                             |   2 -
 tests/qemu-iotests/015                             |   2 -
 tests/qemu-iotests/017                             |   2 -
 tests/qemu-iotests/018                             |   2 -
 tests/qemu-iotests/019                             |   2 -
 tests/qemu-iotests/020                             |   2 -
 tests/qemu-iotests/021                             |   2 -
 tests/qemu-iotests/022                             |   2 -
 tests/qemu-iotests/023                             |   2 -
 tests/qemu-iotests/024                             |   2 -
 tests/qemu-iotests/025                             |   2 -
 tests/qemu-iotests/026                             |   2 -
 tests/qemu-iotests/027                             |   2 -
 tests/qemu-iotests/028                             |   2 -
 tests/qemu-iotests/029                             |   2 -
 tests/qemu-iotests/031                             |   2 -
 tests/qemu-iotests/032                             |   2 -
 tests/qemu-iotests/033                             |   2 -
 tests/qemu-iotests/034                             |   2 -
 tests/qemu-iotests/035                             |   2 -
 tests/qemu-iotests/036                             |   2 -
 tests/qemu-iotests/037                             |   2 -
 tests/qemu-iotests/038                             |   2 -
 tests/qemu-iotests/039                             |  52 +++++++-
 tests/qemu-iotests/039.out                         |  20 +++
 tests/qemu-iotests/042                             |   2 -
 tests/qemu-iotests/043                             |   2 -
 tests/qemu-iotests/046                             |   2 -
 tests/qemu-iotests/047                             |   2 -
 tests/qemu-iotests/048                             |   2 -
 tests/qemu-iotests/049                             |   2 -
 tests/qemu-iotests/050                             |   2 -
 tests/qemu-iotests/051                             |   2 -
 tests/qemu-iotests/052                             |   2 -
 tests/qemu-iotests/053                             |   2 -
 tests/qemu-iotests/054                             |   2 -
 tests/qemu-iotests/058                             |   2 -
 tests/qemu-iotests/059                             |   2 -
 tests/qemu-iotests/060                             |  32 ++++-
 tests/qemu-iotests/060.out                         |  12 ++
 tests/qemu-iotests/061                             |   2 -
 tests/qemu-iotests/062                             |   2 -
 tests/qemu-iotests/063                             |   2 -
 tests/qemu-iotests/064                             |   2 -
 tests/qemu-iotests/066                             |   2 -
 tests/qemu-iotests/068                             |   2 -
 tests/qemu-iotests/069                             |   2 -
 tests/qemu-iotests/070                             |   2 -
 tests/qemu-iotests/071                             |   2 -
 tests/qemu-iotests/072                             |   2 -
 tests/qemu-iotests/073                             |   2 -
 tests/qemu-iotests/074                             |   2 -
 tests/qemu-iotests/075                             |   2 -
 tests/qemu-iotests/076                             |   2 -
 tests/qemu-iotests/077                             |   2 -
 tests/qemu-iotests/078                             |   2 -
 tests/qemu-iotests/079                             |   2 -
 tests/qemu-iotests/080                             |   2 -
 tests/qemu-iotests/081                             |   2 -
 tests/qemu-iotests/082                             |   2 -
 tests/qemu-iotests/083                             |   2 -
 tests/qemu-iotests/084                             |   2 -
 tests/qemu-iotests/085                             |   2 -
 tests/qemu-iotests/086                             |   2 -
 tests/qemu-iotests/087                             |   2 -
 tests/qemu-iotests/088                             |   2 -
 tests/qemu-iotests/089                             |   2 -
 tests/qemu-iotests/090                             |   2 -
 tests/qemu-iotests/091                             |   2 -
 tests/qemu-iotests/092                             |   2 -
 tests/qemu-iotests/094                             |   2 -
 tests/qemu-iotests/095                             |   2 -
 tests/qemu-iotests/097                             |   2 -
 tests/qemu-iotests/098                             |   2 -
 tests/qemu-iotests/099                             |   2 -
 tests/qemu-iotests/101                             |   2 -
 tests/qemu-iotests/102                             |   2 -
 tests/qemu-iotests/103                             |   2 -
 tests/qemu-iotests/104                             |   2 -
 tests/qemu-iotests/105                             |   2 -
 tests/qemu-iotests/106                             |   2 -
 tests/qemu-iotests/107                             |   2 -
 tests/qemu-iotests/108                             |   2 -
 tests/qemu-iotests/109                             |   2 -
 tests/qemu-iotests/110                             |   2 -
 tests/qemu-iotests/111                             |   2 -
 tests/qemu-iotests/112                             |   2 -
 tests/qemu-iotests/113                             |   2 -
 tests/qemu-iotests/114                             |   2 -
 tests/qemu-iotests/115                             |   2 -
 tests/qemu-iotests/116                             |   2 -
 tests/qemu-iotests/117                             |   2 -
 tests/qemu-iotests/119                             |   2 -
 tests/qemu-iotests/120                             |   2 -
 tests/qemu-iotests/121                             |   2 -
 tests/qemu-iotests/122                             |   2 -
 tests/qemu-iotests/123                             |   2 -
 tests/qemu-iotests/125                             |   2 -
 tests/qemu-iotests/126                             |   2 -
 tests/qemu-iotests/127                             |   2 -
 tests/qemu-iotests/128                             |   2 -
 tests/qemu-iotests/130                             |   2 -
 tests/qemu-iotests/131                             |   2 -
 tests/qemu-iotests/133                             |   2 -
 tests/qemu-iotests/134                             |   2 -
 tests/qemu-iotests/135                             |   2 -
 tests/qemu-iotests/137                             |   2 -
 tests/qemu-iotests/138                             |   2 -
 tests/qemu-iotests/140                             |   2 -
 tests/qemu-iotests/142                             |   2 -
 tests/qemu-iotests/143                             |   2 -
 tests/qemu-iotests/144                             |   2 -
 tests/qemu-iotests/145                             |   2 -
 tests/qemu-iotests/146                             |   2 -
 tests/qemu-iotests/150                             |   2 -
 tests/qemu-iotests/153                             |   2 -
 tests/qemu-iotests/154                             |   2 -
 tests/qemu-iotests/156                             |   2 -
 tests/qemu-iotests/157                             |   2 -
 tests/qemu-iotests/158                             |   2 -
 tests/qemu-iotests/159                             |   1 -
 tests/qemu-iotests/160                             |   1 -
 tests/qemu-iotests/161                             |   2 -
 tests/qemu-iotests/162                             |   2 -
 tests/qemu-iotests/170                             |   1 -
 tests/qemu-iotests/171                             |   2 -
 tests/qemu-iotests/172                             |   2 -
 tests/qemu-iotests/173                             |   2 -
 tests/qemu-iotests/174                             |   2 -
 tests/qemu-iotests/175                             |   2 -
 tests/qemu-iotests/176                             |   2 -
 tests/qemu-iotests/177                             |   2 -
 tests/qemu-iotests/178                             |   2 -
 tests/qemu-iotests/179                             |   2 -
 tests/qemu-iotests/181                             |   2 -
 tests/qemu-iotests/182                             |   2 -
 tests/qemu-iotests/184                             |   2 -
 tests/qemu-iotests/185                             |   2 -
 tests/qemu-iotests/186                             |   2 -
 tests/qemu-iotests/187                             |   2 -
 tests/qemu-iotests/188                             |   2 -
 tests/qemu-iotests/189                             |   2 -
 tests/qemu-iotests/190                             |   2 -
 tests/qemu-iotests/191                             |   2 -
 tests/qemu-iotests/192                             |   2 -
 tests/qemu-iotests/195                             |   2 -
 tests/qemu-iotests/197                             |   2 -
 tests/qemu-iotests/198                             |   2 -
 tests/qemu-iotests/200                             |   2 -
 tests/qemu-iotests/204                             |   2 -
 tests/qemu-iotests/225                             |   2 -
 tests/qemu-iotests/226                             |   2 -
 tests/qemu-iotests/227                             |   2 -
 tests/qemu-iotests/229                             |   2 -
 tests/qemu-iotests/231                             |   2 -
 tests/qemu-iotests/232                             |   2 -
 tests/qemu-iotests/233                             |   2 -
 tests/qemu-iotests/236                             |   1 -
 tests/qemu-iotests/239                             |   2 -
 tests/qemu-iotests/243                             |   2 -
 tests/qemu-iotests/244                             |   2 -
 tests/qemu-iotests/246                             |   1 -
 tests/qemu-iotests/247                             |   2 -
 tests/qemu-iotests/249                             |   2 -
 tests/qemu-iotests/250                             |   2 -
 tests/qemu-iotests/251                             |   2 -
 tests/qemu-iotests/252                             |   2 -
 tests/qemu-iotests/256                             |   1 -
 tests/qemu-iotests/257                             |   1 -
 tests/qemu-iotests/259                             |   2 -
 tests/qemu-iotests/261                             |   2 -
 tests/qemu-iotests/263                             |   2 -
 tests/qemu-iotests/267                             |   2 -
 tests/qemu-iotests/268                             |   2 -
 tests/qemu-iotests/271                             |   2 -
 tests/qemu-iotests/284                             |   2 -
 tests/qemu-iotests/287                             |   2 -
 tests/qemu-iotests/288                             |   2 -
 tests/qemu-iotests/290                             |   2 -
 tests/qemu-iotests/292                             |   2 -
 tests/qemu-iotests/293                             |   2 -
 tests/qemu-iotests/294                             |   2 -
 tests/qemu-iotests/302                             |   1 -
 tests/qemu-iotests/304                             |   1 -
 tests/qemu-iotests/305                             |   2 -
 tests/qemu-iotests/312                             |   2 -
 tests/qemu-iotests/313                             |   2 -
 tests/qemu-iotests/314                             |   2 -
 tests/qemu-iotests/tests/commit-zero-blocks        |   2 -
 .../tests/detect-zeroes-registered-buf             |   2 -
 tests/qemu-iotests/tests/inactive-node-nbd         |  16 +++
 tests/qemu-iotests/tests/inactive-node-nbd.out     |   8 ++
 tests/qemu-iotests/tests/iothreads-resize          |   2 -
 tests/qemu-iotests/tests/nbd-in-qcow2-chain        |   2 -
 tests/qemu-iotests/tests/nbd-tls-iothread          |   2 -
 tests/qemu-iotests/tests/parallels-checks          |   2 -
 tests/qemu-iotests/tests/qcow2-encryption          |   2 -
 tests/qemu-iotests/tests/qcow2-internal-snapshots  |   2 -
 tests/qemu-iotests/tests/qemu-img-close-errors     |   2 -
 tests/qemu-iotests/tests/qsd-jobs                  |   2 -
 tests/qemu-iotests/tests/regression-vhdx-log       |   2 -
 224 files changed, 357 insertions(+), 522 deletions(-)
author
#1 lore raw

[PULL 01/21] block-common: fix BDRV_WANT_PRECISE duplicating BDRV_WANT_OFFSET_VALID

From: "Denis V. Lunev" <[email protected]>

Should OR in BDRV_WANT_ALLOCATED instead.

Actually there is not problem within the code right now as the value is used as enum rather than flags but that is for now. Let us stay on the safe side.

Fixes c33159dec790 ("block: Expand block status mode from bool to flags")
CC Eric Blake <[email protected]>
CC Stefan Hajnoczi <[email protected]>

Message-ID: <[email protected]>

---
 include/block/block-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/block/block-common.h +1 -1
index 895ea175413..3932ff86156 100644
@@ -351,7 +351,7 @@ typedef enum {
 #define BDRV_WANT_OFFSET_VALID  BDRV_BLOCK_OFFSET_VALID
 #define BDRV_WANT_ALLOCATED     BDRV_BLOCK_ALLOCATED
 #define BDRV_WANT_PRECISE       (BDRV_WANT_ZERO | BDRV_WANT_OFFSET_VALID | \
-                                 BDRV_WANT_OFFSET_VALID)
+                                 BDRV_WANT_ALLOCATED)
 
 typedef QTAILQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue;
 
Signature · 1 line
2.56.0
author
#2 lore raw

[PULL 03/21] block: fix bdrv_next() skipping monitor-owned nodes

In reply to Kevin Wolf

From: "Denis V. Lunev" <[email protected]>

it->bs is the cursor into monitor_bdrv_states for the second phase of bdrv_next(), so it has to be NULL when that phase starts. Commit f6d38c9f6d made the first phase store the node it returns there, to unreference the right one when the graph changes underneath. The cursor is now left pointing at the last BlockBackend root, so the second phase resumes from there instead of from the head of the list and never returns a node added before it.

A skipped node drops out of the vm_stop and migration handover paths:
not flushed, not inactivated, not snapshotted. bdrv_inactivate_all() still reports success, so the node keeps its image lock and the migration target cannot open the image. Only detached nodes are hit in practice, as these callers also recurse into children.

Reset the cursor when the second phase starts. old_bs is taken at the top of the function, so f6d38c9f6d keeps working.

Fixes f6d38c9f6d ("block-backend: fix edge case in bdrv_next() where BDS associated to BB changes")
Cc Fiona Ebner <[email protected]>
Cc Kevin Wolf <[email protected]>

Message-ID: <[email protected]>

---
 block/block-backend.c                          |  1 +
 tests/qemu-iotests/tests/inactive-node-nbd     | 16 ++++++++++++++++
 tests/qemu-iotests/tests/inactive-node-nbd.out |  8 ++++++++
 3 files changed, 25 insertions(+)
block/block-backend.c +1 -0
index 5e59bac1a3c..ab837fac921 100644
@@ -625,6 +625,7 @@ BlockDriverState *bdrv_next(BdrvNextIterator *it)
             return bs;
         }
         it->phase = BDRV_NEXT_MONITOR_OWNED;
+        it->bs = NULL;
     }
 
     /* Then return the monitor-owned BDSes without a BB attached. Ignore all
tests/qemu-iotests/tests/inactive-node-nbd +16 -0
index 24242265b16..bb6ee5c75ab 100755
@@ -48,6 +48,7 @@ def node_is_active(_vm, node_name):
 
 with iotests.FilePath('disk.img') as path, \
      iotests.FilePath('ro.img') as ro_path, \
+     iotests.FilePath('detached.img') as detached_path, \
      iotests.FilePath('snap.qcow2') as snap_path, \
      iotests.FilePath('snap2.qcow2') as snap2_path, \
      iotests.FilePath('target.img') as target_path, \
@@ -60,6 +61,7 @@ with iotests.FilePath('disk.img') as path, \
     iotests.qemu_img_create('-f', iotests.imgfmt, path, img_size)
     iotests.qemu_img_create('-f', iotests.imgfmt, target_path, img_size)
     iotests.qemu_img_create('-f', iotests.imgfmt, ro_path, img_size)
+    iotests.qemu_img_create('-f', iotests.imgfmt, detached_path, img_size)
 
     iotests.qemu_img_create('-f', 'qcow2', '-b', path, '-F', iotests.imgfmt,
                             snap_path)
@@ -70,6 +72,9 @@ with iotests.FilePath('disk.img') as path, \
     vm.add_blockdev(f'file,node-name=disk-file,filename={path}')
     vm.add_blockdev(f'{iotests.imgfmt},file=disk-file,node-name=disk-fmt,'
                      'active=off')
+    vm.add_blockdev(f'file,node-name=detached-file,filename={detached_path}')
+    vm.add_blockdev(f'{iotests.imgfmt},file=detached-file,'
+                     'node-name=detached-fmt')
     vm.add_blockdev(f'file,node-name=target-file,filename={target_path}')
     vm.add_blockdev(f'{iotests.imgfmt},file=target-file,node-name=target-fmt')
     vm.add_blockdev(f'file,node-name=ro-file,filename={ro_path},read-only=on')
@@ -311,6 +316,17 @@ with iotests.FilePath('disk.img') as path, \
     iotests.log('snap2-fmt active: %s' % node_is_active(vm, 'snap2-fmt'))
     iotests.log('target-fmt active: %s' % node_is_active(vm, 'target-fmt'))
 
+    iotests.log('\n=== Inactivating all nodes at once ===')
+
+    # detached-fmt has no parent and no BlockBackend, so nothing can reach it
+    # by recursion. It is only inactivated if bdrv_next() actually returns it.
+    vm.qmp_log('stop')
+    vm.qmp_log('blockdev-set-active', active=False)
+
+    iotests.log('detached-fmt active: %s' % node_is_active(vm, 'detached-fmt'))
+    iotests.log('detached-file active: %s'
+                % node_is_active(vm, 'detached-file'))
+
     iotests.log('\nShutting down...')
     vm.shutdown()
     log = vm.get_log()
tests/qemu-iotests/tests/inactive-node-nbd.out +8 -0
index 96af7608ded..5ff0063ec46 100644
@@ -243,5 +243,13 @@ snap-fmt active: True
 snap2-fmt active: True
 target-fmt active: True
 
+=== Inactivating all nodes at once ===
+{"execute": "stop", "arguments": {}}
+{"return": {}}
+{"execute": "blockdev-set-active", "arguments": {"active": false}}
+{"return": {}}
+detached-fmt active: False
+detached-file active: False
+
 Shutting down...
 
Signature · 1 line
2.56.0
author
#3 lore raw

[PULL 06/21] scripts/qemugdb: coroutine: Get rid of fallback pattern when dumping backtrace

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

Currently upon invocation of 'qemu bt' / 'qemu coroutine' we try live process backtrace dump first, and if it fails - fallback to coredump. That causes us needless work and catching an exception. In my previous commit 42f3c143c3a0 ("scripts/qemugdb: coroutine: Add option for obtaining detailed trace in coredump") class Coredump was introduced, and each invocation already calls init_coredump(). Let's just pass the result of this call further as a bool param and make a decision based upon it. Apply the same pattern to obtaining coroutine pointer.

Note that we deliberately lose a safety net here: the bare except used to swallow any failure of the live dump, not just the absence of a live process, and silently fall back to the raw unwind. Such a failure is now reported to the user instead.

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
scripts/qemugdb/coroutine.py +13 -13
index d1e6722d14d..d3f31bab9fe 100644
@@ -281,20 +281,19 @@ def dump_backtrace_live(regs):
             # restore previously selected frame in any case
             selected_frame.select()
 
-def bt_jmpbuf(jmpbuf, detailed=False):
+def bt_jmpbuf(jmpbuf, is_coredump, detailed=False):
     '''Backtrace a jmpbuf'''
     regs = get_jmpbuf_regs(jmpbuf)
-    try:
+    if not is_coredump:
         # This reuses gdb's "bt" command, which can be slightly prettier
         # but only works with live sessions.
         dump_backtrace_live(regs)
-    except:
-        if detailed:
-            # Obtain detailed trace by patching regs in copied coredump
-            dump_backtrace_patched(regs)
-        else:
-            # If above doesn't work, fallback to poor man's unwind
-            dump_backtrace(regs)
+    elif detailed:
+        # Obtain detailed trace by patching regs in copied coredump
+        dump_backtrace_patched(regs)
+    else:
+        # Obtain a non-detailed trace by poor man's unwind
+        dump_backtrace(regs)
 
 def co_cast(co):
     return co.cast(gdb.lookup_type('CoroutineUContext').pointer())
@@ -353,7 +352,7 @@ def invoke(self, arg, from_tty):
 
         try:
             bt_jmpbuf(coroutine_to_jmpbuf(gdb.parse_and_eval(argv[0])),
-                      detailed=detailed)
+                      is_coredump, detailed=detailed)
         finally:
             coredump.restore_regs()
 
@@ -390,10 +389,10 @@ def invoke(self, arg, from_tty):
 
         gdb.execute("bt")
 
-        try:
+        if not is_coredump:
             # This only works with a live session
             co_ptr = gdb.parse_and_eval("qemu_coroutine_self()")
-        except:
+        else:
             # Fallback to use hard-coded ucontext vars if it's coredump
             co_ptr = gdb.parse_and_eval("co_tls_current")
 
@@ -407,7 +406,8 @@ def invoke(self, arg, from_tty):
                 if co_ptr == 0:
                     break
                 gdb.write("\nCoroutine at " + str(co_ptr) + ":\n")
-                bt_jmpbuf(coroutine_to_jmpbuf(co_ptr), detailed=detailed)
+                bt_jmpbuf(coroutine_to_jmpbuf(co_ptr), is_coredump,
+                          detailed=detailed)
         finally:
             coredump.restore_regs()
 
Signature · 1 line
2.56.0
author
#4 lore raw

[PULL 05/21] scripts/qemugdb: coroutine: Fix selected frame leak on error path

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

Currently, whenever gdb.execute() fails and throws an exception, previously selected frame gets leaked. I.e.:

(gdb) frame N
(gdb) qemu bt # throws exception
(gdb) frame # shows 0, not N

As a fix, wrap gdb.execute() commands in try/finally, so that selected frame gets restored no matter what.

Fixes 4cbf8efc5b89 ("scripts/gdb: fix 'qemu coroutine' when users selects a non topmost stack frame")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)
scripts/qemugdb/coroutine.py +13 -10
index 29f57ae84ed..d1e6722d14d 100644
@@ -265,18 +265,21 @@ def dump_backtrace_live(regs):
     selected_frame = gdb.selected_frame()
     gdb.newest_frame().select()
 
-    for i in regs:
-        old[i] = gdb.parse_and_eval('(uint64_t)$%s' % i)
-
-    for i in regs:
-        gdb.execute('set $%s = %s' % (i, regs[i]))
-
-    gdb.execute('bt')
+    try:
+        for i in regs:
+            old[i] = gdb.parse_and_eval('(uint64_t)$%s' % i)
 
-    for i in regs:
-        gdb.execute('set $%s = %s' % (i, old[i]))
+        for i in regs:
+            gdb.execute('set $%s = %s' % (i, regs[i]))
 
-    selected_frame.select()
+        gdb.execute('bt')
+    finally:
+        try:
+            for i in old:
+                gdb.execute('set $%s = %s' % (i, old[i]))
+        finally:
+            # restore previously selected frame in any case
+            selected_frame.select()
 
 def bt_jmpbuf(jmpbuf, detailed=False):
     '''Backtrace a jmpbuf'''
Signature · 1 line
2.56.0
author
#5 lore raw

[PULL 02/21] block/throttle-groups: fix crash when enabling I/O limits on a busy disk

In reply to Kevin Wolf

From: "Denis V. Lunev" <[email protected]>

throttle_group_register_tgm() stores tgm->throttle_state before it takes tg->lock, so the I/O path can see a member whose group still has NULL tokens[] and an empty member list. A request in an iothread then reaches throttle_group_co_io_limits_intercept(), wins tg->lock ahead of the registering thread, and next_throttle_token() passes the NULL token to throttle_group_next_tgm(), which dereferences it:

throttle_group_next_tgm (tgm=0x0) at block/throttle-groups.c:185 next_throttle_token (tgm=..., direction=THROTTLE_READ) throttle_group_co_io_limits_intercept (tgm=..., bytes=8192, ...) blk_co_do_preadv_part (blk=..., offset=..., bytes=8192, ...) blk_aio_read_entry (opaque=...)
coroutine_trampoline (i0=..., i1=...)

blk_io_limits_enable() does not drain the BlockBackend, unlike its disable counterpart, so nothing keeps requests away while the group is built. A guest probing a disk that libvirt has just attached, at the moment the QoS settings for it are applied, is enough to hit this.

Publish tgm->throttle_state with a release store once the member is linked into the group and its timers exist, and read it with an acquire load on the two unlocked I/O paths. A request that sees the new pointer then also sees a fully built group.

Cc Kevin Wolf <[email protected]>
Cc Hanna Reitz <[email protected]>
Cc Alberto Garcia <[email protected]>

Message-ID: <[email protected]>

---
 block/block-backend.c   | 12 ++++++------
 block/throttle-groups.c |  4 +++-
 2 files changed, 9 insertions(+), 7 deletions(-)
block/block-backend.c +6 -6
index 37ba7e9fc40..5e59bac1a3c 100644
@@ -1338,6 +1338,7 @@ blk_co_do_preadv_part(BlockBackend *blk, int64_t offset, int64_t bytes,
                       QEMUIOVector *qiov, size_t qiov_offset,
                       BdrvRequestFlags flags)
 {
+    ThrottleGroupMember *tgm = &blk->public.throttle_group_member;
     int ret;
     BlockDriverState *bs;
     IO_CODE();
@@ -1357,9 +1358,8 @@ blk_co_do_preadv_part(BlockBackend *blk, int64_t offset, int64_t bytes,
     bdrv_inc_in_flight(bs);
 
     /* throttling disk I/O */
-    if (blk->public.throttle_group_member.throttle_state) {
-        throttle_group_co_io_limits_intercept(&blk->public.throttle_group_member,
-                bytes, THROTTLE_READ);
+    if (qatomic_load_acquire(&tgm->throttle_state)) {
+        throttle_group_co_io_limits_intercept(tgm, bytes, THROTTLE_READ);
     }
 
     ret = bdrv_co_preadv_part(blk->root, offset, bytes, qiov, qiov_offset,
@@ -1413,6 +1413,7 @@ blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes,
                        QEMUIOVector *qiov, size_t qiov_offset,
                        BdrvRequestFlags flags)
 {
+    ThrottleGroupMember *tgm = &blk->public.throttle_group_member;
     int ret;
     BlockDriverState *bs;
     IO_CODE();
@@ -1431,9 +1432,8 @@ blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes,
 
     bdrv_inc_in_flight(bs);
     /* throttling disk I/O */
-    if (blk->public.throttle_group_member.throttle_state) {
-        throttle_group_co_io_limits_intercept(&blk->public.throttle_group_member,
-                bytes, THROTTLE_WRITE);
+    if (qatomic_load_acquire(&tgm->throttle_state)) {
+        throttle_group_co_io_limits_intercept(tgm, bytes, THROTTLE_WRITE);
     }
 
     if (!blk->enable_write_cache) {
block/throttle-groups.c +3 -1
index 2dfd9d62aac..37814b84fe0 100644
@@ -581,7 +581,6 @@ void throttle_group_register_tgm(ThrottleGroupMember *tgm,
     ThrottleState *ts = throttle_group_incref(groupname);
     ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts);
 
-    tgm->throttle_state = ts;
     tgm->aio_context = ctx;
     qatomic_set(&tgm->restart_pending, 0);
 
@@ -602,6 +601,9 @@ void throttle_group_register_tgm(ThrottleGroupMember *tgm,
                          read_timer_cb,
                          write_timer_cb,
                          tgm);
+
+    /* The I/O path reads this without tg->lock, so publish it last */
+    qatomic_store_release(&tgm->throttle_state, ts);
 }
 
 /* Unregister a ThrottleGroupMember from its group, removing it from the list,
Signature · 1 line
2.56.0
author
#6 lore raw

[PULL 04/21] block: allocate aligned write buffer for 'truncate -m full'

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

In case we're truncating an image opened with O_DIRECT, we might get -EINVAL on write with unaligned buffer. In particular, when running iotests/298 with '-nocache' we get:

qemu-io: Failed to resize underlying file: Could not write zeros for
preallocation: Invalid argument

Let's just allocate the buffer using qemu_blockalign0() instead.

Message-ID: <[email protected]>

---
 block/file-posix.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
block/file-posix.c +2 -3
index 9aad156aad4..39d6a34456c 100644
@@ -2366,7 +2366,7 @@ static int handle_aiocb_truncate(void *opaque)
     RawPosixAIOData *aiocb = opaque;
     int result = 0;
     int64_t current_length = 0;
-    char *buf = NULL;
+    QEMU_AUTO_VFREE char *buf = NULL;
     struct stat st;
     int fd = aiocb->aio_fildes;
     int64_t offset = aiocb->aio_offset;
@@ -2433,7 +2433,7 @@ static int handle_aiocb_truncate(void *opaque)
             goto out;
         }
 
-        buf = g_malloc0(65536);
+        buf = qemu_blockalign0(aiocb->bs, 65536);
 
         seek_result = lseek(fd, current_length, SEEK_SET);
         if (seek_result < 0) {
@@ -2492,7 +2492,6 @@ out:
         }
     }
 
-    g_free(buf);
     return result;
 }
 
Signature · 1 line
2.56.0
author
#7 lore raw

[PULL 07/21] scripts/qemugdb: coroutine: Only attempt to restore regs in coredump

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

When calling 'qemu bt' / 'qemu coroutine' in a live process, we get:

AttributeError: 'NoneType' object has no attribute 'restore_regs'

That's because for both commands finally: blocks attempt to restore patched regs unconditionally. Fix this by guarding regs restoration by 'if is_coredump'.

Fixes 42f3c143c3a0 ("scripts/qemugdb: coroutine: Add option for obtaining detailed trace in coredump")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/qemugdb/coroutine.py +4 -2
index d3f31bab9fe..649579378db 100644
@@ -354,7 +354,8 @@ def invoke(self, arg, from_tty):
             bt_jmpbuf(coroutine_to_jmpbuf(gdb.parse_and_eval(argv[0])),
                       is_coredump, detailed=detailed)
         finally:
-            coredump.restore_regs()
+            if is_coredump:
+                coredump.restore_regs()
 
 class CoroutineBt(gdb.Command):
     __doc__ = textwrap.dedent("""\
@@ -409,7 +410,8 @@ def invoke(self, arg, from_tty):
                 bt_jmpbuf(coroutine_to_jmpbuf(co_ptr), is_coredump,
                           detailed=detailed)
         finally:
-            coredump.restore_regs()
+            if is_coredump:
+                coredump.restore_regs()
 
 class CoroutineSPFunction(gdb.Function):
     def __init__(self):
Signature · 1 line
2.56.0
author
#8 lore raw

[PULL 17/21] file-posix: add statx(STATX_DIOALIGN) support

In reply to Kevin Wolf

From: Stefan Hajnoczi <[email protected]>

Linux v6.1 commit 825cf206ed51 ("statx: add direct I/O alignment information") added an interface to fetch O_DIRECT alignment values for block devices and file systems.

Prefer STATX_DIOALIGN to older interfaces and probing, but keep them as fallbacks in case STATX_DIOALIGN cannot provide the information.

STATX_DIOALIGN support as of Linux 6.1:
- btrfs: no
- ext4: yes
- XFS: yes
- block devices: yes
- dm-crypt: yes

This change fixes #1290 ("IO alignment probing delivers incorrect results on Linux when used with e.g. dm-crypt") on Linux host kernel version 6.1 or later by avoiding the problematic probing code in raw_probe_alignment(). It would be nice to fix the probing code but I have not been able to reproduce it. Stable/LTS distros ship Linux 6.1+, so the number of users without STATX_DIOALIGN is becoming small.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/1290

Message-ID: <[email protected]>

---
 block/file-posix.c | 56 +++++++++++++++++++++++++++++++---------------
 1 file changed, 38 insertions(+), 18 deletions(-)
block/file-posix.c +38 -18
index 39d6a34456c..328adb57233 100644
@@ -426,28 +426,48 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)
 
     bs->bl.request_alignment = 0;
     s->buf_align = 0;
-    /* Let's try to use the logical blocksize for the alignment. */
-    if (probe_logical_blocksize(fd, &bs->bl.request_alignment) < 0) {
-        bs->bl.request_alignment = 0;
-    }
 
-#ifdef __linux__
+#if defined(__linux__) && defined(STATX_DIOALIGN)
+    struct statx stx;
+
     /*
-     * The XFS ioctl definitions are shipped in extra packages that might
-     * not always be available. Since we just need the XFS_IOC_DIOINFO ioctl
-     * here, we simply use our own definition instead:
+     * Linux 6.1 introduced an interface for both block devices and file
+     * systems. The system call returns with the STATX_DIOALIGN bit cleared
+     * when the information is unavailable.
      */
-    struct xfs_dioattr {
-        uint32_t d_mem;
-        uint32_t d_miniosz;
-        uint32_t d_maxiosz;
-    } da;
-    if (ioctl(fd, _IOR('X', 30, struct xfs_dioattr), &da) >= 0) {
-        bs->bl.request_alignment = da.d_miniosz;
-        /* The kernel returns wrong information for d_mem */
-        /* s->buf_align = da.d_mem; */
+    if (statx(fd, "", AT_EMPTY_PATH, STATX_DIOALIGN, &stx) == 0 &&
+        (stx.stx_mask & STATX_DIOALIGN)) {
+        bs->bl.request_alignment = stx.stx_dio_offset_align;
+        s->buf_align = stx.stx_dio_mem_align;
+    }
+#endif /* defined(__linux__) && defined(STATX_DIOALIGN) */
+
+#ifdef __linux__
+    if (!bs->bl.request_alignment) {
+        /*
+         * The XFS ioctl definitions are shipped in extra packages that might
+         * not always be available. Since we just need the XFS_IOC_DIOINFO ioctl
+         * here, we simply use our own definition instead:
+         */
+        struct xfs_dioattr {
+            uint32_t d_mem;
+            uint32_t d_miniosz;
+            uint32_t d_maxiosz;
+        } da;
+        if (ioctl(fd, _IOR('X', 30, struct xfs_dioattr), &da) >= 0) {
+            bs->bl.request_alignment = da.d_miniosz;
+            /* The kernel returns wrong information for d_mem */
+            /* s->buf_align = da.d_mem; */
+        }
+    }
+#endif /* __linux__ */
+
+    /* Let's try to use the logical blocksize for the alignment. */
+    if (!bs->bl.request_alignment) {
+        if (probe_logical_blocksize(fd, &bs->bl.request_alignment) < 0) {
+            bs->bl.request_alignment = 0;
+        }
     }
-#endif
 
     /*
      * If we could not get the sizes so far, we can only guess them. First try
Signature · 1 line
2.56.0
author
#9 lore raw

[PULL 15/21] hw/block/fdc: account for read and write requests

In reply to Kevin Wolf

From: Christian Quante <[email protected]>

hw/block/fdc.c never calls block_acct_*, so a floppy drive stays at zero in query-blockstats and "info blockstats" while IDE, ATAPI, SCSI, virtio-blk, NVMe and xen-block all report their traffic. That is the only interface through which QEMU reports drive activity, so a front-end that shows per-drive activity LEDs -- the way 86Box does -- can light up every bus except the floppy.

The accounting is already set up for the drive: floppy_drive_realize() reaches block_acct_setup() through blkconf_apply_backend_options(), and -device floppy carries account-invalid, account-failed and stats-intervals through DEFINE_BLOCK_PROPERTIES. The properties can be set today, they just have nothing to act on.

Wrap the five blk_pread()/blk_pwrite() calls in two helpers that account for the transfer. The cookie lives on the stack: floppy I/O is synchronous throughout, so it never outlives the call and there is no device state to migrate, unlike IDE where the cookie sits in the device because the transfer is asynchronous -- scsi-disk, nvme, ahci and xen-block all keep it in their request state for the same reason.

Measured with a boot sector that reads 18 sectors from A: and 16 from
C: and writes two back to each. The disk backend reports rd_ops=16 rd_bytes=8192 wr_ops=2 wr_bytes=1024 either way, so the guest did the same work in both runs; the floppy went from rd_ops=0 wr_ops=0 to rd_ops=19 rd_bytes=9728 wr_ops=2 wr_bytes=1024 -- 19 reads being the boot sector the BIOS pulls in plus the 18 the guest asks for.

Message-ID: <[email protected]>

---
 hw/block/fdc.c | 52 +++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 41 insertions(+), 11 deletions(-)
hw/block/fdc.c +41 -11
index 1178b959a64..41776af6a0e 100644
@@ -222,6 +222,42 @@ static int fd_offset(FDrive *drv)
     return fd_sector(drv) << BDRV_SECTOR_BITS;
 }
 
+/* Reads the sector at the current position and accounts for the request */
+static int fd_read_sector(FDrive *drv, uint8_t *buf)
+{
+    BlockAcctStats *stats = blk_get_stats(drv->blk);
+    BlockAcctCookie acct;
+    int ret;
+
+    block_acct_start(stats, &acct, BDRV_SECTOR_SIZE, BLOCK_ACCT_READ);
+    ret = blk_pread(drv->blk, fd_offset(drv), BDRV_SECTOR_SIZE, buf, 0);
+    if (ret < 0) {
+        block_acct_failed(stats, &acct);
+    } else {
+        block_acct_done(stats, &acct);
+    }
+
+    return ret;
+}
+
+/* Writes the sector at the current position and accounts for the request */
+static int fd_write_sector(FDrive *drv, const uint8_t *buf)
+{
+    BlockAcctStats *stats = blk_get_stats(drv->blk);
+    BlockAcctCookie acct;
+    int ret;
+
+    block_acct_start(stats, &acct, BDRV_SECTOR_SIZE, BLOCK_ACCT_WRITE);
+    ret = blk_pwrite(drv->blk, fd_offset(drv), BDRV_SECTOR_SIZE, buf, 0);
+    if (ret < 0) {
+        block_acct_failed(stats, &acct);
+    } else {
+        block_acct_done(stats, &acct);
+    }
+
+    return ret;
+}
+
 /* Seek to a new position:
  * returns 0 if already on right track
  * returns 1 if track changed
@@ -1644,8 +1680,7 @@ int fdctrl_transfer_handler(void *opaque, int nchan, int dma_pos, int dma_len)
         if (fdctrl->data_dir != FD_DIR_WRITE ||
             len < FD_SECTOR_LEN || rel_pos != 0) {
             /* READ & SCAN commands and realign to a sector for WRITE */
-            if (blk_pread(cur_drv->blk, fd_offset(cur_drv), BDRV_SECTOR_SIZE,
-                          fdctrl->fifo, 0) < 0) {
+            if (fd_read_sector(cur_drv, fdctrl->fifo) < 0) {
                 FLOPPY_DPRINTF("Floppy: error getting sector %d\n",
                                fd_sector(cur_drv));
                 /* Sure, image size is too small... */
@@ -1672,8 +1707,7 @@ int fdctrl_transfer_handler(void *opaque, int nchan, int dma_pos, int dma_len)
 
             k->read_memory(fdctrl->dma, nchan, fdctrl->fifo + rel_pos,
                            fdctrl->data_pos, len);
-            if (blk_pwrite(cur_drv->blk, fd_offset(cur_drv), BDRV_SECTOR_SIZE,
-                           fdctrl->fifo, 0) < 0) {
+            if (fd_write_sector(cur_drv, fdctrl->fifo) < 0) {
                 FLOPPY_DPRINTF("error writing sector %d\n",
                                fd_sector(cur_drv));
                 fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, 0x00, 0x00);
@@ -1756,9 +1790,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
                                    fd_sector(cur_drv));
                     return 0;
                 }
-            if (blk_pread(cur_drv->blk, fd_offset(cur_drv), BDRV_SECTOR_SIZE,
-                          fdctrl->fifo, 0)
-                < 0) {
+            if (fd_read_sector(cur_drv, fdctrl->fifo) < 0) {
                 FLOPPY_DPRINTF("error getting sector %d\n",
                                fd_sector(cur_drv));
                 /* Sure, image size is too small... */
@@ -1843,8 +1875,7 @@ static void fdctrl_format_sector(FDCtrl *fdctrl)
     }
     memset(fdctrl->fifo, 0, FD_SECTOR_LEN);
     if (cur_drv->blk == NULL ||
-        blk_pwrite(cur_drv->blk, fd_offset(cur_drv), BDRV_SECTOR_SIZE,
-                   fdctrl->fifo, 0) < 0) {
+        fd_write_sector(cur_drv, fdctrl->fifo) < 0) {
         FLOPPY_DPRINTF("error formatting sector %d\n", fd_sector(cur_drv));
         fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, 0x00, 0x00);
     } else {
@@ -2270,8 +2301,7 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
         if (pos == FD_SECTOR_LEN - 1 ||
             fdctrl->data_pos == fdctrl->data_len) {
             cur_drv = get_cur_drv(fdctrl);
-            if (blk_pwrite(cur_drv->blk, fd_offset(cur_drv), BDRV_SECTOR_SIZE,
-                           fdctrl->fifo, 0) < 0) {
+            if (fd_write_sector(cur_drv, fdctrl->fifo) < 0) {
                 FLOPPY_DPRINTF("error writing sector %d\n",
                                fd_sector(cur_drv));
                 break;
Signature · 1 line
2.56.0
author
#10 lore raw

[PULL 09/21] scripts/qemugdb: coroutine: Fix patching pt_regs in the coredump

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

patch_regs() and restore_regs() open the coredump with 'ab', i.e. with O_APPEND. This repositions the file offset to the end of the file before every write. The seek() to pt_regs therefore has no effect: instead of patching the saved registers, we just append the binary blob with patched regs at the end of the file.

Nothing fails, and the gdb subprocess still prints a plausible backtrace. However it's a backtrace of the crashed thread rather than of the requested coroutine. The .ptregs blob kept for recovery is dead for the same reason as there's never anything to restore.

Open the file with 'r+b' so that the writes actually land where seek() points.

Fixes 42f3c143c3a0 ("scripts/qemugdb: coroutine: Add option for obtaining detailed trace in coredump")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/qemugdb/coroutine.py +2 -2
index da395a1a13e..4803914dde0 100644
@@ -90,7 +90,7 @@ def patch_regs(self, regs):
         int_regs = {k: int(v) for k, v in regs.items()}
         patched_ptregs.update(int_regs)
 
-        with open(self.coredump, 'ab') as f:
+        with open(self.coredump, 'r+b') as f:
             gdb.write(f'assume pt_regs at 0x{self._ptregs_offset:x}\n')
             f.seek(self._ptregs_offset, 0)
             gdb.write('writing regs:\n')
@@ -106,7 +106,7 @@ def restore_regs(self):
             return
 
         gdb.write(f'\nrestoring original regs in core file {self.coredump}\n')
-        with open(self.coredump, 'ab') as f:
+        with open(self.coredump, 'r+b') as f:
             gdb.write(f'assume pt_regs at 0x{self._ptregs_offset:x}\n')
             f.seek(self._ptregs_offset, 0)
             f.write(struct.pack(f"={len(PT_REGS)}q",
Signature · 1 line
2.56.0
author
#11 lore raw

[PULL 10/21] scripts/qemugdb: coroutine: Fix '--detailed' description

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

Both commands claim the coredump is copied before its registers get patched, but patch_regs() writes to the coredump itself. Describe what actually happens, so that nobody expects their coredump to be left alone. Fix a typo in "runing" while at it.

Fixes 42f3c143c3a0 ("scripts/qemugdb: coroutine: Add option for obtaining detailed trace in coredump")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
scripts/qemugdb/coroutine.py +7 -7
index 4803914dde0..9148264de3c 100644
@@ -306,7 +306,7 @@ def bt_jmpbuf(jmpbuf, is_coredump, detailed=False):
         # but only works with live sessions.
         dump_backtrace_live(regs)
     elif detailed:
-        # Obtain detailed trace by patching regs in copied coredump
+        # Obtain detailed trace by patching regs in the coredump in place
         dump_backtrace_patched(regs)
     else:
         # Obtain a non-detailed trace by poor man's unwind
@@ -342,9 +342,9 @@ class CoroutineCommand(gdb.Command):
         Usage: qemu coroutine COROPTR [--detailed]
         Show backtrace for a coroutine specified by COROPTR
 
-          --detailed       obtain detailed trace by copying coredump, patching
-                           regs in it, and runing gdb subprocess to get
-                           backtrace from the patched coredump
+          --detailed       obtain detailed trace by patching regs in the
+                           coredump in place, and running gdb subprocess to
+                           get backtrace from the patched coredump
         """)
 
     def __init__(self):
@@ -380,9 +380,9 @@ class CoroutineBt(gdb.Command):
 
         Usage: qemu bt [--detailed]
 
-          --detailed       obtain detailed trace by copying coredump, patching
-                           regs in it, and runing gdb subprocess to get
-                           backtrace from the patched coredump
+          --detailed       obtain detailed trace by patching regs in the
+                           coredump in place, and running gdb subprocess to
+                           get backtrace from the patched coredump
         """)
 
     def __init__(self):
Signature · 1 line
2.56.0
author
#12 lore raw

[PULL 18/21] qcow2: do not clear the dirty bit when reopening a read-only node

In reply to Kevin Wolf

From: "Denis V. Lunev" <[email protected]>

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.

Message-ID: <[email protected]>

---
 block/qcow2.c              |  8 +++---
 tests/qemu-iotests/039     | 50 ++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/039.out | 20 +++++++++++++++
 3 files changed, 75 insertions(+), 3 deletions(-)
block/qcow2.c +5 -3
index 7292dd036c9..1543255eba8 100644
@@ -2102,9 +2102,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;
+            }
         }
     }
 
tests/qemu-iotests/039 +50 -0

62 lines not on this page · raw message

tests/qemu-iotests/039.out +20 -0
index c66361128f6..ce8ee577216 100644
@@ -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
Signature · 1 line
2.56.0
author
#13 lore raw

[PULL 14/21] iotests: remove unused 'owner=' variable assignment

In reply to Kevin Wolf

From: Daniel P. Berrangé <[email protected]>

Most, but not all, of the shell I/O tests assign an email address to the 'owner' shell variable. This variable is never used for anything so gets reported as a dead assignment by shellcheck. The same is also not done for the python I/O tests, though some include owner= in a comment.

Mostly the 'owner=' variable seems to be an alternative to expressing an "Author: NAME <EMAIL>" comment, but without the NAME. While they could be converted to Author comments, this does not have a benefit over using Git history and are not widely used in QEMU source code. Git records activity over time so is more representative than the initial author. Meanwhile the MAINTAINERS file, also expresses a notion of ownership over the maint of files.

Message-ID: <[email protected]>

---
 tests/qemu-iotests/001                                | 2 --
 tests/qemu-iotests/002                                | 2 --
 tests/qemu-iotests/003                                | 2 --
 tests/qemu-iotests/004                                | 2 --
 tests/qemu-iotests/005                                | 2 --
 tests/qemu-iotests/007                                | 2 --
 tests/qemu-iotests/008                                | 2 --
 tests/qemu-iotests/009                                | 2 --
 tests/qemu-iotests/010                                | 2 --
 tests/qemu-iotests/011                                | 2 --
 tests/qemu-iotests/012                                | 2 --
 tests/qemu-iotests/013                                | 2 --
 tests/qemu-iotests/014                                | 2 --
 tests/qemu-iotests/015                                | 2 --
 tests/qemu-iotests/017                                | 2 --
 tests/qemu-iotests/018                                | 2 --
 tests/qemu-iotests/019                                | 2 --
 tests/qemu-iotests/020                                | 2 --
 tests/qemu-iotests/021                                | 2 --
 tests/qemu-iotests/022                                | 2 --
 tests/qemu-iotests/023                                | 2 --
 tests/qemu-iotests/024                                | 2 --
 tests/qemu-iotests/025                                | 2 --
 tests/qemu-iotests/026                                | 2 --
 tests/qemu-iotests/027                                | 2 --
 tests/qemu-iotests/028                                | 2 --
 tests/qemu-iotests/029                                | 2 --
 tests/qemu-iotests/031                                | 2 --
 tests/qemu-iotests/032                                | 2 --
 tests/qemu-iotests/033                                | 2 --
 tests/qemu-iotests/034                                | 2 --
 tests/qemu-iotests/035                                | 2 --
 tests/qemu-iotests/036                                | 2 --
 tests/qemu-iotests/037                                | 2 --
 tests/qemu-iotests/038                                | 2 --
 tests/qemu-iotests/039                                | 2 --
 tests/qemu-iotests/042                                | 2 --
 tests/qemu-iotests/043                                | 2 --
 tests/qemu-iotests/046                                | 2 --
 tests/qemu-iotests/047                                | 2 --
 tests/qemu-iotests/048                                | 2 --
 tests/qemu-iotests/049                                | 2 --
 tests/qemu-iotests/050                                | 2 --
 tests/qemu-iotests/051                                | 2 --
 tests/qemu-iotests/052                                | 2 --
 tests/qemu-iotests/053                                | 2 --
 tests/qemu-iotests/054                                | 2 --
 tests/qemu-iotests/058                                | 2 --
 tests/qemu-iotests/059                                | 2 --
 tests/qemu-iotests/060                                | 2 --
 tests/qemu-iotests/061                                | 2 --
 tests/qemu-iotests/062                                | 2 --
 tests/qemu-iotests/063                                | 2 --
 tests/qemu-iotests/064                                | 2 --
 tests/qemu-iotests/066                                | 2 --
 tests/qemu-iotests/068                                | 2 --
 tests/qemu-iotests/069                                | 2 --
 tests/qemu-iotests/070                                | 2 --
 tests/qemu-iotests/071                                | 2 --
 tests/qemu-iotests/072                                | 2 --
 tests/qemu-iotests/073                                | 2 --
 tests/qemu-iotests/074                                | 2 --
 tests/qemu-iotests/075                                | 2 --
 tests/qemu-iotests/076                                | 2 --
 tests/qemu-iotests/077                                | 2 --
 tests/qemu-iotests/078                                | 2 --
 tests/qemu-iotests/079                                | 2 --
 tests/qemu-iotests/080                                | 2 --
 tests/qemu-iotests/081                                | 2 --
 tests/qemu-iotests/082                                | 2 --
 tests/qemu-iotests/083                                | 2 --
 tests/qemu-iotests/084                                | 2 --
 tests/qemu-iotests/085                                | 2 --
 tests/qemu-iotests/086                                | 2 --
 tests/qemu-iotests/087                                | 2 --
 tests/qemu-iotests/088                                | 2 --
 tests/qemu-iotests/089                                | 2 --
 tests/qemu-iotests/090                                | 2 --
 tests/qemu-iotests/091                                | 2 --
 tests/qemu-iotests/092                                | 2 --
 tests/qemu-iotests/094                                | 2 --
 tests/qemu-iotests/095                                | 2 --
 tests/qemu-iotests/097                                | 2 --
 tests/qemu-iotests/098                                | 2 --
 tests/qemu-iotests/099                                | 2 --
 tests/qemu-iotests/101                                | 2 --
 tests/qemu-iotests/102                                | 2 --
 tests/qemu-iotests/103                                | 2 --
 tests/qemu-iotests/104                                | 2 --
 tests/qemu-iotests/105                                | 2 --
 tests/qemu-iotests/106                                | 2 --
 tests/qemu-iotests/107                                | 2 --
 tests/qemu-iotests/108                                | 2 --
 tests/qemu-iotests/109                                | 2 --
 tests/qemu-iotests/110                                | 2 --
 tests/qemu-iotests/111                                | 2 --
 tests/qemu-iotests/112                                | 2 --
 tests/qemu-iotests/113                                | 2 --
 tests/qemu-iotests/114                                | 2 --
 tests/qemu-iotests/115                                | 2 --
 tests/qemu-iotests/116                                | 2 --
 tests/qemu-iotests/117                                | 2 --
 tests/qemu-iotests/119                                | 2 --
 tests/qemu-iotests/120                                | 2 --
 tests/qemu-iotests/121                                | 2 --
 tests/qemu-iotests/122                                | 2 --
 tests/qemu-iotests/123                                | 2 --
 tests/qemu-iotests/125                                | 2 --
 tests/qemu-iotests/126                                | 2 --
 tests/qemu-iotests/127                                | 2 --
 tests/qemu-iotests/128                                | 2 --
 tests/qemu-iotests/130                                | 2 --
 tests/qemu-iotests/131                                | 2 --
 tests/qemu-iotests/133                                | 2 --
 tests/qemu-iotests/134                                | 2 --
 tests/qemu-iotests/135                                | 2 --
 tests/qemu-iotests/137                                | 2 --
 tests/qemu-iotests/138                                | 2 --
 tests/qemu-iotests/140                                | 2 --
 tests/qemu-iotests/142                                | 2 --
 tests/qemu-iotests/143                                | 2 --
 tests/qemu-iotests/144                                | 2 --
 tests/qemu-iotests/145                                | 2 --
 tests/qemu-iotests/146                                | 2 --
 tests/qemu-iotests/150                                | 2 --
 tests/qemu-iotests/153                                | 2 --
 tests/qemu-iotests/154                                | 2 --
 tests/qemu-iotests/156                                | 2 --
 tests/qemu-iotests/157                                | 2 --
 tests/qemu-iotests/158                                | 2 --
 tests/qemu-iotests/159                                | 1 -
 tests/qemu-iotests/160                                | 1 -
 tests/qemu-iotests/161                                | 2 --
 tests/qemu-iotests/162                                | 2 --
 tests/qemu-iotests/170                                | 1 -
 tests/qemu-iotests/171                                | 2 --
 tests/qemu-iotests/172                                | 2 --
 tests/qemu-iotests/173                                | 2 --
 tests/qemu-iotests/174                                | 2 --
 tests/qemu-iotests/175                                | 2 --
 tests/qemu-iotests/176                                | 2 --
 tests/qemu-iotests/177                                | 2 --
 tests/qemu-iotests/178                                | 2 --
 tests/qemu-iotests/179                                | 2 --
 tests/qemu-iotests/181                                | 2 --
 tests/qemu-iotests/182                                | 2 --
 tests/qemu-iotests/184                                | 2 --
 tests/qemu-iotests/185                                | 2 --
 tests/qemu-iotests/186                                | 2 --
 tests/qemu-iotests/187                                | 2 --
 tests/qemu-iotests/188                                | 2 --
 tests/qemu-iotests/189                                | 2 --
 tests/qemu-iotests/190                                | 2 --
 tests/qemu-iotests/191                                | 2 --
 tests/qemu-iotests/192                                | 2 --
 tests/qemu-iotests/195                                | 2 --
 tests/qemu-iotests/197                                | 2 --
 tests/qemu-iotests/198                                | 2 --
 tests/qemu-iotests/200                                | 2 --
 tests/qemu-iotests/204                                | 2 --
 tests/qemu-iotests/225                                | 2 --
 tests/qemu-iotests/226                                | 2 --
 tests/qemu-iotests/227                                | 2 --
 tests/qemu-iotests/229                                | 2 --
 tests/qemu-iotests/231                                | 2 --
 tests/qemu-iotests/232                                | 2 --
 tests/qemu-iotests/233                                | 2 --
 tests/qemu-iotests/236                                | 1 -
 tests/qemu-iotests/239                                | 2 --
 tests/qemu-iotests/243                                | 2 --
 tests/qemu-iotests/244                                | 2 --
 tests/qemu-iotests/246                                | 1 -
 tests/qemu-iotests/247                                | 2 --
 tests/qemu-iotests/249                                | 2 --
 tests/qemu-iotests/250                                | 2 --
 tests/qemu-iotests/251                                | 2 --
 tests/qemu-iotests/252                                | 2 --
 tests/qemu-iotests/256                                | 1 -
 tests/qemu-iotests/257                                | 1 -
 tests/qemu-iotests/259                                | 2 --
 tests/qemu-iotests/261                                | 2 --
 tests/qemu-iotests/263                                | 2 --
 tests/qemu-iotests/267                                | 2 --
 tests/qemu-iotests/268                                | 2 --
 tests/qemu-iotests/271                                | 2 --
 tests/qemu-iotests/284                                | 2 --
 tests/qemu-iotests/287                                | 2 --
 tests/qemu-iotests/288                                | 2 --
 tests/qemu-iotests/290                                | 2 --
 tests/qemu-iotests/292                                | 2 --
 tests/qemu-iotests/293                                | 2 --
 tests/qemu-iotests/294                                | 2 --
 tests/qemu-iotests/302                                | 1 -
 tests/qemu-iotests/304                                | 1 -
 tests/qemu-iotests/305                                | 2 --
 tests/qemu-iotests/312                                | 2 --
 tests/qemu-iotests/313                                | 2 --
 tests/qemu-iotests/314                                | 2 --
 tests/qemu-iotests/tests/commit-zero-blocks           | 2 --
 tests/qemu-iotests/tests/detect-zeroes-registered-buf | 2 --
 tests/qemu-iotests/tests/iothreads-resize             | 2 --
 tests/qemu-iotests/tests/nbd-in-qcow2-chain           | 2 --
 tests/qemu-iotests/tests/nbd-tls-iothread             | 2 --
 tests/qemu-iotests/tests/parallels-checks             | 2 --
 tests/qemu-iotests/tests/qcow2-encryption             | 2 --
 tests/qemu-iotests/tests/qcow2-internal-snapshots     | 2 --
 tests/qemu-iotests/tests/qemu-img-close-errors        | 2 --
 tests/qemu-iotests/tests/qsd-jobs                     | 2 --
 tests/qemu-iotests/tests/regression-vhdx-log          | 2 --
 209 files changed, 409 deletions(-)
tests/qemu-iotests/001 +0 -2
index 6f980fd34d6..d26c13ea034 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/002 +0 -2
index 5ce16475312..865fa0626eb 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/003 +0 -2
index 03f902a83cb..0594e24b0ec 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/004 +0 -2
index e955579a671..5591717477b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/005 +0 -2
index ba377543b01..ddf72296b42 100755
@@ -22,8 +22,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/007 +0 -2
index 936d3f14fba..dedee97181a 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/008 +0 -2
index fa4990b5139..aee45f90cce 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/009 +0 -2
index efa852bad30..b6abcf64633 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/010 +0 -2
index 4ae9027b475..de4067fdb0a 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/011 +0 -2
index 5c99ac987ff..30deccec5f9 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/012 +0 -2
index 3a24d2ca8d2..6fda3de6b92 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/013 +0 -2
index d39d0cd88b6..741292342be 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/014 +0 -2
index 2d23469332c..edc628ba516 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/015 +0 -2
index 40c23235a62..e715b596525 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/017 +0 -2
index 2024b85e797..d26c76621cb 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/018 +0 -2
index 6fcebbb40ec..7206ccc8735 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/019 +0 -2
index fa4458fd27b..3f88b793cb2 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/020 +0 -2
index 60c672e17b9..89acea62105 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/021 +0 -2
index 0fc89df2fe8..14a24f533d4 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/022 +0 -2
index d98d1ea90fe..d0974674792 100755
@@ -19,8 +19,6 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/023 +0 -2
index d19d13ff5dc..655e2250e04 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/024 +0 -2
index 10be2bd8452..48e1f157a9d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/025 +0 -2
index 5771ea9200c..233bad58e29 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/026 +0 -2
index d37e266dade..f43a2bd55b3 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/027 +0 -2
index 24c93627bb3..3c900da7b5f 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/028 +0 -2
index 28f01439c52..e19b4a7ed63 100755
@@ -22,8 +22,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/029 +0 -2
index 7f4849b97bf..d13e14c2d9c 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/031 +0 -2
index ee587b1606f..5c825a12566 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/032 +0 -2
index ebbe7cb0ba1..560af4929da 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/033 +0 -2
index 4bc7a071bdf..3165e1a8d67 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/034 +0 -2
index ac1af8f6464..29d12ea2b3c 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/035 +0 -2
index 0c0c4fdd42f..19a38b51d96 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/036 +0 -2
index 16a401985ca..584f38e29ff 100755
@@ -22,8 +22,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/037 +0 -2
index 85b1015056e..5b56c5214cf 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/038 +0 -2
index 65bf7a753e8..989335c4682 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/039 +0 -2
index 94a8bfe754e..8fe677ce731 100755
@@ -22,8 +22,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/042 +0 -2
index 411e54ae047..26c35e1430c 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/043 +0 -2
index f8ce3288db4..5da6d6b607a 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/046 +0 -2
index 0d84b5c1c75..2242fad455b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/047 +0 -2
index 8dd21e0a818..84bc71d6635 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/048 +0 -2
index bf8e4bf5282..884b330b6b2 100755
@@ -20,8 +20,6 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ##
 #
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/049 +0 -2
index a1b922060db..4f41c50df2d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/050 +0 -2
index 1de01c312e2..934f6c91877 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/051 +0 -2
index a722c0c1bc8..25dff9d4eaa 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/052 +0 -2
index 2f23ac9b65a..8e76c05f47f 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/053 +0 -2
index 9a2958d42dc..c89128094ce 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/054 +0 -2
index ea147012c31..d3dd3fa88bb 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/058 +0 -2
index ce35ff4ee0a..8102c01d5e4 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/059 +0 -2
index 0634c7bd928..49c58ad05c3 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/060 +0 -2
index 8d06f84df16..ccdc96b7f8b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/061 +0 -2
index b71ac097d14..fd7c3fa940b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/062 +0 -2
index 6a71bf14779..4d12b860c90 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/063 +0 -2
index 3a44758053c..66f90ee518e 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/064 +0 -2
index 21e25cf39f6..21b27ce88b5 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/066 +0 -2
index 336d8565ddf..1b379c5faf2 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/068 +0 -2
index 11b660a8b7c..0a1ce25d6ee 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/069 +0 -2
index 6647e118613..a1da1ec3c79 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/070 +0 -2
index edb71afbe37..28e2ba480e7 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/071 +0 -2
index 83c4ce6314c..fc4eba8e180 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/072 +0 -2
index 662ede961c4..e97f853f64d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/073 +0 -2
index 90afd420bdb..840d36ed696 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/074 +0 -2
index ee73e636b2f..b3e9510b898 100755
@@ -20,8 +20,6 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ##
 #
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/075 +0 -2
index ca2ed2a05c4..f54727074ae 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/076 +0 -2
index 1a8927d765d..e9069bccc11 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/077 +0 -2
index fbb90d80361..adbd5db92d3 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/078 +0 -2
index 0b48b7f137f..e4d2165f189 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/079 +0 -2
index 793e1f9d08f..053df1c93d1 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/080 +0 -2
index 33065006837..882161c1406 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/081 +0 -2
index d9e729f674c..1d4682ec058 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/082 +0 -2
index 021b9bef063..e1ff3575297 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/083 +0 -2
index bc32b537b2b..d5906ea29ff 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/084 +0 -2
index 1181cb7cd06..a397adc9a14 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/085 +0 -2
index 3fb7b0b5c8c..3256791f249 100755
@@ -24,8 +24,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/086 +0 -2
index c055e7bfe18..15606bc3f9b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/087 +0 -2
index d8e0e384cdf..815fe3370fd 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/088 +0 -2
index e3102fe888b..30b08f2abe0 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/089 +0 -2
index c68c5a66b9b..406cd61279d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/090 +0 -2
index 8f88eea9aa7..94052b3fb40 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/091 +0 -2
index 626203d6fc9..dd590fc0902 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/092 +0 -2
index bfa116d1919..577ac856797 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/094 +0 -2
index 4766e9a4587..c1ea7e5bd6d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/095 +0 -2
index d1d347eb1fa..c4498f6e702 100755
@@ -22,8 +22,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/097 +0 -2
index 93857f4fd02..d5072227605 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/098 +0 -2
index e3eadb32962..6103579b47a 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/099 +0 -2
index a5d2d309313..9a89ea85d0d 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/101 +0 -2
index 4c4a8cea112..f1a8f5a6d9b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/102 +0 -2
index 5db8180d3bb..3f56229ab42 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/103 +0 -2
index bb9fd6f650f..958431be148 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/104 +0 -2
index 3ebb74cf6e0..20a5657ae48 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/105 +0 -2
index b8f2029f622..9ae5fca8356 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/106 +0 -2
index 55548439aad..770176b3742 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/107 +0 -2
index 3fabff27916..c47e733acb9 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/108 +0 -2
index bf808b35125..1de718188aa 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/109 +0 -2
index 0fb580f9a59..a36366912e8 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/110 +0 -2
index 91b15f7513c..50121ad08be 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/111 +0 -2
index 382dbf06063..3adc9aab49c 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/112 +0 -2
index a2ffc96e600..a58918e60d0 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/113 +0 -2
index a3ad208fd78..ccd93ca8575 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/114 +0 -2
index dccc71008b5..a040f958b30 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/115 +0 -2
index 7a24070caad..5c8a12f85aa 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/116 +0 -2
index 4f40fcb3d21..0e914f754e7 100755
@@ -22,8 +22,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/117 +0 -2
index 5cc9433f4a6..7ef8f1fd1ca 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/119 +0 -2
index ce1b62521f5..ae3cf52e0aa 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/120 +0 -2
index e4ed87e1a70..f93b2069bb7 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/121 +0 -2
index f0dd1d11145..cf262501736 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/122 +0 -2
index be0f6b79e5d..7f84188f51d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/123 +0 -2
index 4d34a2ac49e..13e491a5478 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/125 +0 -2
index 708e7c5ba21..59e63ad5e70 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/126 +0 -2
index d8d2d654f24..1e6855c5ede 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/127 +0 -2
index 7cc3ce1d78e..b912b0461b5 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/128 +0 -2
index d75b1a451a0..1837ad0b8d3 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/130 +0 -2
index 3d10aba2594..a53b024895c 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/131 +0 -2
index 3119100e78a..6e183e52bd9 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/133 +0 -2
index d997db16855..a57620040cb 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/134 +0 -2
index cc1e35eb161..bf3ee4996dc 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/135 +0 -2
index 71125719eeb..d00496efffd 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/137 +0 -2
index 52ee1351840..13c16ea2316 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/138 +0 -2
index 76628adab7c..1adc295fa63 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/140 +0 -2
index d923b777e28..aa09a831799 100755
@@ -23,8 +23,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/142 +0 -2
index 8538a727ac0..cae04068887 100755
@@ -18,8 +18,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/143 +0 -2
index 92a081b79e9..fb12bfbfab6 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/144 +0 -2
index d284a0e442d..70381a4fe1d 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/145 +0 -2
index f61a50f6395..bbc3c34c192 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/146 +0 -2
index f63291d0ffb..455ba1e17b5 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/150 +0 -2
index fab0faa389c..8a5458944fa 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/153 +0 -2
index def01d6f3ea..cf7f91d6b46 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/154 +0 -2
index 24e29ae2ffe..b6ab0729453 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/156 +0 -2
index a0e4d1ffd42..5a753f46535 100755
@@ -27,8 +27,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/157 +0 -2
index 531dbd3122b..b8efdb21447 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/158 +0 -2
index 8fc4e986532..5de3b3edc81 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/159 +0 -1
index 4eb476d3a8e..409c0a4652a 100755
@@ -19,7 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/160 +0 -1
index 7984a9c6f7e..bab1c4ea474 100755
@@ -19,7 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/161 +0 -2
index 8ca13926297..3c928885fbb 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/162 +0 -2
index 94dae60d304..4f016118865 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/170 +0 -1
index 41387e4d660..3a30c82dcc5 100755
@@ -19,7 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/171 +0 -2
index 87a8aa24d96..20f03c34738 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/172 +0 -2
index a78e42ff0ad..e0a46155796 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/173 +0 -2
index 217e55c1685..2a3f3045e56 100755
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/174 +0 -2
index d4cecb57566..b7e9ab6fa4c 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/175 +0 -2
index bbbf550a5af..d433ceb47e7 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/176 +0 -2
index a6a2a4cd44b..8901a83aa3a 100755
@@ -24,8 +24,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/177 +0 -2
index 8d8745b29a6..f2aca83e245 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/178 +0 -2
index 463c59a77f1..f4db4ba2ddf 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/179 +0 -2
index 09447b56103..a7de5acf1a8 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/181 +0 -2
index 458cb737f1c..f25392f6494 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/182 +0 -2
index af5eeb599c1..ebfa76cd670 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/184 +0 -2
index 9248b3265d8..55a4909a54d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
-owner="Manos Pitsidianakis"
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/185 +0 -2
index bb577a9cc99..41d4551d067 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/186 +0 -2
index 9a4215d28e9..538c5ac5e2d 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/187 +0 -2
index 70b74b033c3..bed45050cc1 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/188 +0 -2
index 2950b1dc31f..9714c7e8fd9 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/189 +0 -2
index 008f73b07d0..cf1b567ff92 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/190 +0 -2
index 7fb84473547..4bc027875b3 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/191 +0 -2
index ce695b95c25..3465278f656 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/192 +0 -2
index 6869bd17153..02142e1d2f1 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/195 +0 -2
index f1df69079f5..1b0fe7eb7dd 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/197 +0 -2
index 69849c800ed..3286250770c 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/198 +0 -2
index 6ddeffddd2c..74e432b0bbf 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/200 +0 -2
index f66c571d240..682bcdce9d2 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/204 +0 -2
index ab68b6d75cf..8bda9164762 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/225 +0 -2
index 8128d583d60..2e9ff4c26b5 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/226 +0 -2
index 6a9adb4a0bc..2fd968a0dbe 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/227 +0 -2
index eddaad679e2..02978bf2a07 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/229 +0 -2
index aaa6996ce3a..21aaf707504 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/231 +0 -2
index eddc8e9641d..ba17e9489c5 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/232 +0 -2
index 1ee0aae481d..b07a346d75a 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/233 +0 -2
index 55db5b3811f..f0ccdee4b2c 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/236 +0 -1
index 3cf0de4043f..a10fea28024 100755
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# [email protected]
 
 import iotests
 from iotests import log
tests/qemu-iotests/239 +0 -2
index 4f0037148d9..83061b7b2ea 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/243 +0 -2
index 8bbb510120d..4394d3711ab 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/244 +0 -2
index 2a98ad58f5d..a8af524c122 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/246 +0 -1
index cee5131c3ce..7e1c96a8bcb 100755
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# [email protected]
 
 import iotests
 from iotests import log
tests/qemu-iotests/247 +0 -2
index ace6dba052a..8fb72082c77 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/249 +0 -2
index 1254bf94291..73c17343c0a 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/250 +0 -2
index c0a0dbc0ff1..98b81cd217e 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/251 +0 -2
index 794cad58b26..b90b3914de4 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/252 +0 -2
index 522333cf1dc..29facfd2a60 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/256 +0 -1
index 1a4c9c6885e..4a787d59086 100755
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# [email protected]
 
 import os
 import iotests
tests/qemu-iotests/257 +0 -1
index 5e4dba02e76..ab542ac0b4e 100755
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# [email protected]
 
 import math
 import os
tests/qemu-iotests/259 +0 -2
index 82f5de4b340..48eada5e7ef 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/261 +0 -2
index 22b969d3108..f9fed94e1e2 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=$(basename $0)
 echo "QA output created by $seq"
tests/qemu-iotests/263 +0 -2
index 44fdada0d6f..ab2dea7627c 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/267 +0 -2
index e14aeb1f18d..1ee76edec44 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/268 +0 -2
index 9a8a5637603..444acf8b3cc 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/271 +0 -2
index 59a6fafa2fa..26c6b078259 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/284 +0 -2
index 722267486d0..f9268a0e9ce 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/287 +0 -2
index 6414640b212..a22c185791e 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/288 +0 -2
index 47aca6592a6..81c652c085e 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/290 +0 -2
index 776b59de1bc..341a25f96b5 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/292 +0 -2
index 73cbb9364ac..ef1b2881a5c 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/293 +0 -2
index 37294487b11..47fef797429 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/294 +0 -2
index 9059eb26b3b..3e34cb66eab 100755
@@ -17,8 +17,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/302 +0 -1
index e980ec513f2..7c7a507ce52 100755
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# [email protected]
 
 import io
 import tarfile
tests/qemu-iotests/304 +0 -1
index 03c7c1cbe3c..99b25300107 100755
@@ -18,7 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# [email protected]
 
 import iotests
 from iotests import qemu_img_create, qemu_img_log, file_path
tests/qemu-iotests/305 +0 -2
index 8b26156923d..798ced27654 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/312 +0 -2
index 0d9ea09a31f..8dfb92a5baf 100755
@@ -25,8 +25,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/313 +0 -2
index a75655b7ef0..675f6e4382e 100755
@@ -21,8 +21,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/314 +0 -2
index 96d7b4d2581..91f222130eb 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/commit-zero-blocks +0 -2
index de00273e727..d9fa8629acd 100755
@@ -23,8 +23,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/detect-zeroes-registered-buf +0 -2
index 5eaf34e5a6b..ddf636239d7 100755
@@ -22,8 +22,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/iothreads-resize +0 -2
index 36e4598c621..d8de0831943 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/nbd-in-qcow2-chain +0 -2
index 455ddfa86fe..9a977e5a1bd 100755
@@ -7,8 +7,6 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/nbd-tls-iothread +0 -2
index a2fb07206e5..6cf52a0aa92 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/parallels-checks +0 -2
index ca89ed5d62c..eb0a32d636b 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
tests/qemu-iotests/tests/qcow2-encryption +0 -2
index 95f6195ab86..e7d75042117 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/tests/qcow2-internal-snapshots +0 -2
index d301f0941b5..4ea382e88f7 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/tests/qemu-img-close-errors +0 -2
index 50bfb6cfa2a..91270fe6703 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/tests/qsd-jobs +0 -2
index 9b843af6312..6bd5e81e761 100755
@@ -19,8 +19,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq="$(basename $0)"
 echo "QA output created by $seq"
tests/qemu-iotests/tests/regression-vhdx-log +0 -2
index ca264e93d61..5354c5fb0c1 100755
@@ -20,8 +20,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-# creator
[email protected]
 
 seq=`basename $0`
 echo "QA output created by $seq"
Signature · 1 line
2.56.0
author
#14 lore raw

[PULL 08/21] scripts/qemugdb: coroutine: Don't unwind past the outermost frame

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

dump_backtrace() walks the frame pointer chain until rbp is NULL. However, when glibc is built with no frame pointers, rbp is never NULL during unwind. Instead, we see garbage in the outermost frame. This results into:

#17 0x5610b6e9f2d9 in main<+1720> () at ../qemu-io.c:674 #18 0x7f26cc10230e in __libc_start_call_main<+125> () at

      ../sysdeps/nptl/libc_start_call_main.h:58

Traceback (most recent call last):
File "/.../scripts/qemugdb/coroutine.py", line 409, in invoke
bt_jmpbuf(coroutine_to_jmpbuf(co_ptr), is_coredump,
File "/.../scripts/qemugdb/coroutine.py", line 296, in bt_jmpbuf
dump_backtrace(regs)
File "/.../scripts/qemugdb/coroutine.py", line 247, in dump_backtrace
while rbp:
^^^
gdb.MemoryError: Cannot access memory at address 0x4
Error occurred in Python: Cannot access memory at address 0x4

As a fix, stop on the first link that can't be read. Since gdb.parse_and_eval() returns a lazy value, force the actual memory read by wrapping it in int() and immediately catching potential gdb.MemoryError.

Fixes 772f86839f77 ("scripts/qemu-gdb: Support coroutine dumps in coredumps")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)
scripts/qemugdb/coroutine.py +21 -4
index 649579378db..da395a1a13e 100644
@@ -235,13 +235,24 @@ def dump_backtrace_patched(regs):
     out = run_with_pty(cmd).split('----split----')[1]
     gdb.write(out)
 
+def read_word(addr):
+    '''
+    Read a 64-bit word, None if that memory isn't accessible.
+    '''
+    try:
+        # gdb.parse_and_eval() returns lazy values.  Force memory access
+        # by wrapping in int()
+        return int(gdb.parse_and_eval(f"*(uint64_t *){hex(addr)}"))
+    except gdb.MemoryError:
+        return None
+
 def dump_backtrace(regs):
     '''
     Backtrace dump with raw registers, mimic GDB command 'bt'.
     '''
     # Here only rbp and rip that matter..
-    rbp = regs['rbp']
-    rip = regs['rip']
+    rbp = int(regs['rbp'])
+    rip = int(regs['rip'])
     i = 0
 
     while rbp:
@@ -250,8 +261,14 @@ def dump_backtrace(regs):
         # instruction instead of the CALL.  Here -1 would work for any
         # sized CALL instruction.
         print(f"#{i}  {hex(rip)} in {symbol_lookup(rip if i == 0 else rip-1)}")
-        rip = gdb.parse_and_eval(f"*(uint64_t *)(uint64_t)({hex(rbp)} + 8)")
-        rbp = gdb.parse_and_eval(f"*(uint64_t *)(uint64_t)({hex(rbp)})")
+
+        # The 'rbp != NULL' condition is insufficient: the outermost glibc
+        # frames might leave garbage in rbp if built without frame pointers.
+        # Break the loop on the frame that leads nowhere.
+        rip, rbp = read_word(rbp + 8), read_word(rbp)
+        if rip is None or rbp is None:
+            break
+
         i += 1
 
 def dump_backtrace_live(regs):
Signature · 1 line
2.56.0
author
#15 lore raw

[PULL 13/21] scripts/qemugdb: coroutine: Don't touch the coredump for a plain backtrace

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

init_coredump() creates a Coredump object for every coredump session. That
implies opening and scanning the actual coredump file. For non-detailed
'qemu bt' invocation we don't really need it.

Les't only create the object when the core is about to be patched, i.e. for '--detailed'.

Fixes 42f3c143c3a0 ("scripts/qemugdb: coroutine: Add option for obtaining detailed trace in coredump")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
scripts/qemugdb/coroutine.py +7 -6
index 21ed7cbaab8..edc1f3cc69f 100644
@@ -328,7 +328,7 @@ def coroutine_to_jmpbuf(co):
     coroutine_pointer = co_cast(co)
     return coroutine_pointer['env']['__jmpbuf']
 
-def init_coredump():
+def init_coredump(detailed=False):
     global coredump
 
     files = gdb.execute('info files', False, True)
@@ -337,7 +337,8 @@ def init_coredump():
     if match is None:
         return False
 
-    if coredump is None:
+    # The object is only needed to patch the coredump
+    if detailed and coredump is None:
         coredump = Coredump(match.group(1), gdb.current_progspace().filename)
 
     return True
@@ -372,7 +373,7 @@ def invoke(self, arg, from_tty):
         if gdb.selected_thread() is None:
             raise gdb.GdbError('No stack.')
 
-        is_coredump = init_coredump()
+        is_coredump = init_coredump(detailed)
         if detailed and not is_coredump:
             gdb.write('--detailed is only valid when debugging core dumps\n')
             return
@@ -381,7 +382,7 @@ def invoke(self, arg, from_tty):
             bt_jmpbuf(coroutine_to_jmpbuf(gdb.parse_and_eval(argv[0])),
                       is_coredump, detailed=detailed)
         finally:
-            if is_coredump:
+            if coredump is not None:
                 coredump.restore_regs()
 
 class CoroutineBt(gdb.Command):
@@ -413,7 +414,7 @@ def invoke(self, arg, from_tty):
         if gdb.selected_thread() is None:
             raise gdb.GdbError('No stack.')
 
-        is_coredump = init_coredump()
+        is_coredump = init_coredump(detailed)
         if detailed and not is_coredump:
             gdb.write('--detailed is only valid when debugging core dumps\n')
             return
@@ -441,7 +442,7 @@ def invoke(self, arg, from_tty):
                 bt_jmpbuf(coroutine_to_jmpbuf(co_ptr), is_coredump,
                           detailed=detailed)
         finally:
-            if is_coredump:
+            if coredump is not None:
                 coredump.restore_regs()
 
 class CoroutineSPFunction(gdb.Function):
Signature · 1 line
2.56.0
author
#16 lore raw

[PULL 11/21] scripts/qemugdb: coroutine: Handle target absence gracefully

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

init_coredump() picks the core dump and the executable out of fixed lines of 'info files' output. With no target loaded that output is empty, and 'qemu bt' dies with:

IndexError: list index out of range

Search the whole output for the core dump file instead, and take the executable from gdb.current_progspace(), which doesn't need parsing at all. Neither can raise if the pattern isn't there, so an unexpected output format now just means "not a coredump" rather than a traceback.

That alone only moves the problem to gdb.execute("bt"), whose gdb.error escapes invoke() and still gets reported as a python traceback. At the same time plain 'bt' just prints 'No stack.'. Let's mimick this behaviour and simply report an error if there's no selected thread.

Fixes 42f3c143c3a0 ("scripts/qemugdb: coroutine: Add option for obtaining detailed trace in coredump")

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
scripts/qemugdb/coroutine.py +10 -6
index 9148264de3c..3e0b37b73ea 100644
@@ -322,16 +322,14 @@ def coroutine_to_jmpbuf(co):
 def init_coredump():
     global coredump
 
-    files = gdb.execute('info files', False, True).split('\n')
+    files = gdb.execute('info files', False, True)
 
-    if not 'core dump' in files[1]:
+    match = re.search(r"core dump file:\s*`([^']+)'", files)
+    if match is None:
         return False
 
-    core_path = re.search("`(.*)'", files[2]).group(1)
-    exec_path = re.match('^Symbols from "(.*)".$', files[0]).group(1)
-
     if coredump is None:
-        coredump = Coredump(core_path, exec_path)
+        coredump = Coredump(match.group(1), gdb.current_progspace().filename)
 
     return True
 
@@ -362,6 +360,9 @@ def invoke(self, arg, from_tty):
             return self._usage()
         detailed = True if argc == 2 else False
 
+        if gdb.selected_thread() is None:
+            raise gdb.GdbError('No stack.')
+
         is_coredump = init_coredump()
         if detailed and not is_coredump:
             gdb.write('--detailed is only valid when debugging core dumps\n')
@@ -400,6 +401,9 @@ def invoke(self, arg, from_tty):
             return self._usage()
         detailed = True if argc == 1 else False
 
+        if gdb.selected_thread() is None:
+            raise gdb.GdbError('No stack.')
+
         is_coredump = init_coredump()
         if detailed and not is_coredump:
             gdb.write('--detailed is only valid when debugging core dumps\n')
Signature · 1 line
2.56.0
author
#17 lore raw

[PULL 20/21] block: Fix corruption from broken RMW atomicity

In reply to Kevin Wolf

When emulating 512 byte sector devices on top of 4k native host storage, QEMU performs a read-modify-write cycle for misaligned write requests. These requests are marked as serialising so that any other writes to the same 4k block will have to wait and can't overwrite the block in the middle, which would make the RMW write back stale data.

In principle, this mechanism works fine, but there is a race condition in the implementation: bdrv_find_conflicting_request() assumes that req->waiting_for == NULL means that the request is the active owner of the data blocks it touches and everyone else has to wait for this request. However, there is a window between tracked_request_begin() and bdrv_wait_serialising_requests_locked() where any new request has req->waiting_for == NULL even if it conflicts with an already running serialising request. So at this point, we have seemingly two active owners at the same time until the new request checks for conflicts.

For a third request coming in, this isn't a problem, it just might wait for a little longer than necessary. However, if the original RMW request calls bdrv_wait_serialising_requests_locked() again (which it does in bdrv_aligned_pwritev() -> bdrv_co_write_req_prepare() before writing back the RMW buffer), it will now wait on the other request that snuck in, which is fatal and makes the RMW buffer stale. This scenario causes data corruption.

Fix this by checking for conflicts already in tracked_request_begin() while holding the bs->reqs_lock mutex, so that the race window is closed and req->waiting_for == NULL really has the intended meaning.

For good measure, add an active_owner boolean that is set when a request is marked serialising and has completed waiting for other requests, and assert that it is not set when waiting for another request, so that in the case of another bug, we'd crash instead of causing data corruption.

Message-ID: <[email protected]>

---
 include/block/block_int-common.h |  1 +
 block/io.c                       | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)
include/block/block_int-common.h +1 -0
index 147c08155f7..46428b034de 100644
@@ -80,6 +80,7 @@ typedef struct BdrvTrackedRequest {
     enum BdrvTrackedRequestType type;
 
     bool serialising;
+    bool active_owner;
     int64_t overlap_offset;
     int64_t overlap_bytes;
 
block/io.c +23 -0
index a916b236c3c..bd562d472fd 100644
@@ -50,6 +50,9 @@
 static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs,
     int64_t offset, int64_t bytes, BdrvRequestFlags flags);
 
+static void coroutine_fn
+bdrv_wait_serialising_requests_locked(BdrvTrackedRequest *self);
+
 static void GRAPH_RDLOCK
 bdrv_parent_drained_begin(BlockDriverState *bs, BdrvChild *ignore)
 {
@@ -616,6 +619,7 @@ static void coroutine_fn tracked_request_begin(BdrvTrackedRequest *req,
         .type           = type,
         .co             = qemu_coroutine_self(),
         .serialising    = false,
+        .active_owner   = false,
         .overlap_offset = offset,
         .overlap_bytes  = bytes,
     };
@@ -624,6 +628,15 @@ static void coroutine_fn tracked_request_begin(BdrvTrackedRequest *req,
 
     qemu_mutex_lock(&bs->reqs_lock);
     QLIST_INSERT_HEAD(&bs->tracked_requests, req, list);
+
+    /*
+     * Set .waiting_for while we're holding the lock, otherwise we'd open a race
+     * window where another request in the middle of its RMW cycle starts
+     * waiting for us, leading to potential data corruption if this request
+     * overwrites a block the RMW request has already read.
+     */
+    bdrv_wait_serialising_requests_locked(req);
+
     qemu_mutex_unlock(&bs->reqs_lock);
 }
 
@@ -684,6 +697,15 @@ bdrv_wait_serialising_requests_locked(BdrvTrackedRequest *self)
     BdrvTrackedRequest *req;
 
     while ((req = bdrv_find_conflicting_request(self))) {
+        /*
+         * If this request is the active owner of the data blocks it accesses,
+         * no other conflicting request may exist; other requests have to wait
+         * for this one, not the other way around. If this condition is
+         * violated, RMW operations may be interrupted in the middle, operate on
+         * stale data and introduce data corruption.
+         */
+        assert(!self->active_owner);
+
         self->waiting_for = req;
         qemu_co_queue_wait(&req->wait_queue, &self->bs->reqs_lock);
         self->waiting_for = NULL;
@@ -803,6 +825,7 @@ void coroutine_fn bdrv_make_request_serialising(BdrvTrackedRequest *req,
 
     tracked_request_set_serialising(req, align);
     bdrv_wait_serialising_requests_locked(req);
+    req->active_owner = true;
 
     qemu_mutex_unlock(&req->bs->reqs_lock);
 }
Signature · 1 line
2.56.0
author
#18 lore raw

[PULL 16/21] iotests: annotate TestRunner.shared_self for mypy 2.4

In reply to Kevin Wolf

From: Tim Pambor <[email protected]>

mypy 2.4.0 infers the unannotated class attribute "shared_self = None" as having type "None" and rejects the later assignment of a TestRunner instance in run_tests_pool():

testrunner.py:126: error: Incompatible types in assignment (expression has type "TestRunner", variable has type "None")

Earlier mypy versions treated the attribute as a partial type and accepted the assignment. Give the attribute an explicit Optional['TestRunner'] annotation so both old and new mypy agree.

Fixes tests/linters.py::TestLinters::test_mypy_iotests with mypy >= 2.4.

Message-ID: <[email protected]>

---
 tests/qemu-iotests/testrunner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/testrunner.py +1 -1
index cc36867719d..729680da4aa 100644
@@ -108,7 +108,7 @@ def __init__(self, status: str, description: str = '',
 
 
 class TestRunner(contextlib.AbstractContextManager['TestRunner']):
-    shared_self = None
+    shared_self: Optional['TestRunner'] = None
 
     @staticmethod
     def proc_run_test(test: str, test_field_width: int) -> TestResult:
Signature · 1 line
2.56.0
author
#19 lore raw

[PULL 12/21] scripts/qemugdb: coroutine: Speed up coroutine lookup in a coredump

In reply to Kevin Wolf

From: Andrey Drobyshev <[email protected]>

'qemu bt' on a coredump takes significant time before the first coroutine frame is even printed. The bulk of the delay is resolving a name.

co_tls_current is a file static variable, and CoroutineUContext is defined in the same compilation unit, so resolving either of them by name makes gdb expand every symtab in the binary.

Look the static up with gdb.lookup_static_symbol(), which is served from the gdb's in-memory index, and scope the type lookup to the symtab that comes with it. This significantly speeds up 'qemu bt' processing.

Message-ID: <[email protected]>

---
 scripts/qemugdb/coroutine.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
scripts/qemugdb/coroutine.py +12 -2
index 3e0b37b73ea..21ed7cbaab8 100644
@@ -313,7 +313,16 @@ def bt_jmpbuf(jmpbuf, is_coredump, detailed=False):
         dump_backtrace(regs)
 
 def co_cast(co):
-    return co.cast(gdb.lookup_type('CoroutineUContext').pointer())
+    # Unscoped type lookup expands every symtab in the binary.
+    # Better scope it to the symtab of the ucontext backend
+    sym = gdb.lookup_static_symbol('co_tls_current')
+    if sym is not None:
+        co_type = gdb.lookup_type('CoroutineUContext',
+                                  sym.symtab.static_block())
+    else:
+        co_type = gdb.lookup_type('CoroutineUContext')
+
+    return co.cast(co_type.pointer())
 
 def coroutine_to_jmpbuf(co):
     coroutine_pointer = co_cast(co)
@@ -416,7 +425,8 @@ def invoke(self, arg, from_tty):
             co_ptr = gdb.parse_and_eval("qemu_coroutine_self()")
         else:
             # Fallback to use hard-coded ucontext vars if it's coredump
-            co_ptr = gdb.parse_and_eval("co_tls_current")
+            sym = gdb.lookup_static_symbol("co_tls_current")
+            co_ptr = sym.value() if sym else gdb.parse_and_eval("co_tls_current")
 
         if co_ptr == False:
             return
Signature · 1 line
2.56.0
author
#20 lore raw

[PULL 19/21] block: reject a reopen of an unusable node instead of crashing

In reply to Kevin Wolf

From: "Denis V. Lunev" <[email protected]>

qcow2_signal_corruption() drops bs->drv, so a node can lose its driver at any time and a reopen has to expect that. Both ends of the path assume otherwise:

  $ qemu-io -c "read 0 64k" -c "reopen -r" corrupt.qcow2
  qcow2: Marking image as corrupt: Cluster allocation offset 0x1200
  unaligned (L2 offset: 0x40000, L2 index: 0); ...
  Segmentation fault

bdrv_reopen_queue_child() dereferences bs->drv while descending into the children the node opened itself, and bdrv_reopen_prepare() asserts on it. commit_clean() reopens the base of a commit job back to read-only, so a base which goes corrupt under the job arrives here too.

There is nothing to reopen for such a node, so stop descending into its children and let bdrv_reopen_prepare() report what every caller of bdrv_reopen() already handles. bdrv_reopen_commit() and bdrv_reopen_abort() keep their assertion, only a prepared entry reaches them.

Message-ID: <[email protected]>

---
 block.c                    | 14 +++++++++++++-
 tests/qemu-iotests/060     | 30 ++++++++++++++++++++++++++++++
 tests/qemu-iotests/060.out | 12 ++++++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)
block.c +13 -1
index f0a6042e616..e39f15816aa 100644
@@ -4486,6 +4486,11 @@ bdrv_reopen_queue_child(BlockReopenQueue *bs_queue, BlockDriverState *bs,
             !qdict_haskey(options, "backing.driver");
     }
 
+    /* An unusable node is rejected by bdrv_reopen_prepare(), do not descend */
+    if (!bs->drv) {
+        return bs_queue;
+    }
+
     QLIST_FOREACH(child, &bs->children, next) {
         QDict *new_child_options = NULL;
         bool child_keep_old = keep_old_opts;
@@ -4881,9 +4886,16 @@ bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
     bool drv_prepared = false;
 
     assert(reopen_state != NULL);
-    assert(reopen_state->bs->drv != NULL);
     GLOBAL_STATE_CODE();
+
     drv = reopen_state->bs->drv;
+    if (drv == NULL) {
+        GRAPH_RDLOCK_GUARD_MAINLOOP();
+
+        error_setg(errp, "Block node '%s' has no driver left to reopen",
+                   bdrv_get_device_or_node_name(reopen_state->bs));
+        return -ENOMEDIUM;
+    }
 
     /* This function and each driver's bdrv_reopen_prepare() remove
      * entries from reopen_state->options as they are processed, so
tests/qemu-iotests/060 +30 -0
index ccdc96b7f8b..50bdb8b81da 100755
@@ -485,6 +485,36 @@ echo
 # Image should not have been marked corrupt
 _img_info --format-specific | grep 'corrupt:'
 
+echo
+echo "=== Testing the reopen of an image corrupted at runtime ==="
+echo
+
+_make_test_img 64M
+poke_file "$TEST_IMG" "$l1_offset" "\x00\x00\x00\x00\x2a\x2a\x2a\x2a"
+
+# The read leaves the node unusable, the reopen must report that
+echo "{'execute': 'qmp_capabilities'}
+      {'execute': 'human-monitor-command',
+       'arguments': {'command-line': 'qemu-io drive \"read 0 512\"'}}
+      {'execute': 'blockdev-reopen',
+       'arguments': {'options': [{'node-name': 'drive',
+                                  'driver': 'qcow2',
+                                  'read-only': true,
+                                  'file': {
+                                      'driver': 'file',
+                                      'filename': '$TEST_IMG'
+                                  }}]}}
+      {'execute': 'quit'}" \
+    | $QEMU -qmp stdio -nographic -nodefaults \
+            -blockdev "{'node-name': 'drive',
+                        'driver': 'qcow2',
+                        'file': {
+                            'driver': 'file',
+                            'filename': '$TEST_IMG'
+                        }}" \
+            2>&1 \
+    | _filter_qmp | _filter_qemu_io
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
tests/qemu-iotests/060.out +12 -0
index 27275fd6b70..7a1835221b7 100644
@@ -434,4 +434,16 @@ qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); fur
 {"return": {}}
 
     corrupt: false
+
+=== Testing the reopen of an image corrupted at runtime ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
+QMP_VERSION
+{"return": {}}
+qcow2: Marking image as corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further corruption events will be suppressed
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)", "node-name": "drive", "fatal": true}}
+{"return": "Error: read failed: Input/output error\r\n"}
+{"error": {"class": "GenericError", "desc": "Block node 'drive' has no driver left to reopen"}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
+{"return": {}}
 *** done
Signature · 1 line
2.56.0
author
#21 lore raw

[PULL 21/21] block: Remove now redundant bdrv_wait_serialising_requests() calls

In reply to Kevin Wolf

All callers of bdrv_wait_serialising_requests() (as opposed to bdrv_wait_serialising_requests_locked()) are just duplicating the check that tracked_request_begin() already performs now. After removing them, bdrv_wait_serialising_requests() has no callers left and can go as well.

Message-ID: <[email protected]>

---
 block/io.c | 19 -------------------
 1 file changed, 19 deletions(-)
block/io.c +0 -19
index bd562d472fd..1c05dd106d6 100644
@@ -802,20 +802,6 @@ void bdrv_dec_in_flight(BlockDriverState *bs)
     bdrv_wakeup(bs);
 }
 
-static void coroutine_fn
-bdrv_wait_serialising_requests(BdrvTrackedRequest *self)
-{
-    BlockDriverState *bs = self->bs;
-
-    if (!qatomic_read(&bs->serialising_in_flight)) {
-        return;
-    }
-
-    qemu_mutex_lock(&bs->reqs_lock);
-    bdrv_wait_serialising_requests_locked(self);
-    qemu_mutex_unlock(&bs->reqs_lock);
-}
-
 void coroutine_fn bdrv_make_request_serialising(BdrvTrackedRequest *req,
                                                 uint64_t align)
 {
@@ -1383,8 +1369,6 @@ bdrv_aligned_preadv(BdrvChild *child, BdrvTrackedRequest *req,
          * it ensures that the CoR read and write operations are atomic and
          * guest writes cannot interleave between them. */
         bdrv_make_request_serialising(req, bdrv_get_cluster_size(bs));
-    } else {
-        bdrv_wait_serialising_requests(req);
     }
 
     if (flags & BDRV_REQ_COPY_ON_READ) {
@@ -2021,8 +2005,6 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t offset, int64_t bytes,
         }
 
         bdrv_wait_serialising_requests_locked(req);
-    } else {
-        bdrv_wait_serialising_requests(req);
     }
 
     assert(req->overlap_offset <= offset);
@@ -3530,7 +3512,6 @@ static int coroutine_fn GRAPH_RDLOCK bdrv_co_copy_range_internal(
 
         /* BDRV_REQ_SERIALISING is only for write operation */
         assert(!(read_flags & BDRV_REQ_SERIALISING));
-        bdrv_wait_serialising_requests(&req);
 
         ret = src->bs->drv->bdrv_co_copy_range_from(src->bs,
                                                     src, src_offset,
Signature · 1 line
2.56.0
#22 lore raw
In reply to Kevin Wolf
Quoted 15 lines · Kevin Wolf

The following changes since commit f9587d4045c67cd0d8d8bdcd5d0bb5b6b395b63c:

   Merge tag 'pbouvier/pr/plugins-20261005' ofhttps://gitlab.com/p-b-o/qemu into staging (2026-10-06 11:26:40 +0200)

are available in the Git repository at:

https://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to cf4f672c11d663f87462cfd99a92124b30804e99:

   block: Remove now redundant bdrv_wait_serialising_requests() calls (2026-10-07 18:00:36 +0200)

----------------------------------------------------------------
Block layer patches

Quoted 9 lines

- Fix corruption from broken RMW atomicity
- Fix bdrv_next() skipping monitor-owned nodes
- fdc: Account for read and write requests
- throttle-groups: Fix crash when enabling I/O limits on a busy disk
- file-posix: Fixed O_DIRECT alignment for truncate requests
- file-posix: add statx(STATX_DIOALIGN) support
- qcow2: (Partially) fix reopen for read-only nodes
- scripts/qemugdb: Fixes for 'qemu bt' / 'qemu coroutine' commands
- Code cleanup

Applied, thanks.

r~