Skip to contentSkip to conversation

Block layer patches for 2.6.0-rc3

GIT PULL Applied Kevin Wolf 2 participants 21 messages Apr 15, 2016 – Apr 18, 2016 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

The following changes since commit 538a467329818ea831f602491ac62d7d7999102a:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2016-04-15 10:49:04 +0100)

are available in the git repository at:

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

for you to fetch changes up to cdc8845331cf789636dfa88dc47e22fcdaef4057:

Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-04-15' into queue-block (2016-04-15 17:59:42 +0200)

----------------------------------------------------------------

Block layer patches for 2.6.0-rc3

----------------------------------------------------------------
Dr. David Alan Gilbert (1):
Fix pflash migration

Eric Blake (2):
nbd: Don't fail handshake on NBD_OPT_LIST descriptions
nbd: Don't kill server on client that doesn't request TLS

Fam Zheng (1):
qemu-iotests: 041: More robust assertion on quorum node

Jeff Cody (6):
block/vpc: set errp in vpc_create
block/vpc: use current_size field for XenConverter VHD images block/vpc: Use the correct max sector count for VHD images block/vpc: make checks on max table size a bit more lax block/vpc: set errp in vpc_open
block/vpc: update comments to be compliant w/coding guidelines

Kevin Wolf (4):
qemu-io: Support 'aio_write -z'
block: Fix blk_aio_write_zeroes()
block: Don't ignore flags in blk_{,co,aio}_write_zeroes()
Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-04-15' into queue-block

Pavel Butsykin (1):
nbd: fix assert() on qemu-nbd stop

Sascha Silbe (4):
qemu-iotests: drop unused _within_tolerance() filter
qemu-iotests: common.rc: drop unused _do()
qemu-iotests: tests: do not set unused tmp variable
qemu-iotests: place valgrind log file in scratch dir

Stefan Hajnoczi (1):
vpc: use current_size field for XenServer VHD images

 block/block-backend.c            |  27 +++++++----
 block/vpc.c                      | 102 ++++++++++++++++++++++-----------------
 hw/block/pflash_cfi01.c          |  18 ++++++-
 nbd/client.c                     |  23 ++++++++-
 nbd/server.c                     |  15 +++++-
 qemu-io-cmds.c                   |  65 +++++++++++++++++++------
 qemu-nbd.c                       |   2 +-
 tests/qemu-iotests/001           |   1 -
 tests/qemu-iotests/002           |   1 -
 tests/qemu-iotests/003           |   1 -
 tests/qemu-iotests/004           |   1 -
 tests/qemu-iotests/005           |   1 -
 tests/qemu-iotests/007           |   1 -
 tests/qemu-iotests/008           |   1 -
 tests/qemu-iotests/009           |   1 -
 tests/qemu-iotests/010           |   1 -
 tests/qemu-iotests/011           |   1 -
 tests/qemu-iotests/012           |   1 -
 tests/qemu-iotests/013           |   1 -
 tests/qemu-iotests/014           |   1 -
 tests/qemu-iotests/015           |   1 -
 tests/qemu-iotests/017           |   1 -
 tests/qemu-iotests/018           |   1 -
 tests/qemu-iotests/019           |   1 -
 tests/qemu-iotests/020           |   1 -
 tests/qemu-iotests/021           |   1 -
 tests/qemu-iotests/022           |   1 -
 tests/qemu-iotests/023           |   1 -
 tests/qemu-iotests/024           |   1 -
 tests/qemu-iotests/025           |   1 -
 tests/qemu-iotests/026           |   1 -
 tests/qemu-iotests/027           |   1 -
 tests/qemu-iotests/028           |   1 -
 tests/qemu-iotests/029           |   1 -
 tests/qemu-iotests/031           |   1 -
 tests/qemu-iotests/032           |   1 -
 tests/qemu-iotests/033           |   9 ++--
 tests/qemu-iotests/033.out       |  82 +++++++++++++++++++++++++++++++
 tests/qemu-iotests/034           |   1 -
 tests/qemu-iotests/035           |   1 -
 tests/qemu-iotests/036           |   1 -
 tests/qemu-iotests/037           |   1 -
 tests/qemu-iotests/038           |   1 -
 tests/qemu-iotests/039           |   1 -
 tests/qemu-iotests/041           |  12 ++---
 tests/qemu-iotests/042           |   1 -
 tests/qemu-iotests/043           |   1 -
 tests/qemu-iotests/046           |   1 -
 tests/qemu-iotests/047           |   1 -
 tests/qemu-iotests/049           |   1 -
 tests/qemu-iotests/050           |   1 -
 tests/qemu-iotests/051           |   1 -
 tests/qemu-iotests/052           |   1 -
 tests/qemu-iotests/053           |   1 -
 tests/qemu-iotests/054           |   1 -
 tests/qemu-iotests/058           |   1 -
 tests/qemu-iotests/059           |   1 -
 tests/qemu-iotests/060           |   1 -
 tests/qemu-iotests/061           |   1 -
 tests/qemu-iotests/062           |   1 -
 tests/qemu-iotests/063           |   1 -
 tests/qemu-iotests/064           |   1 -
 tests/qemu-iotests/066           |   1 -
 tests/qemu-iotests/067           |   1 -
 tests/qemu-iotests/068           |   1 -
 tests/qemu-iotests/069           |   1 -
 tests/qemu-iotests/070           |   1 -
 tests/qemu-iotests/071           |   1 -
 tests/qemu-iotests/072           |   1 -
 tests/qemu-iotests/073           |   1 -
 tests/qemu-iotests/075           |   1 -
 tests/qemu-iotests/076           |   1 -
 tests/qemu-iotests/077           |   1 -
 tests/qemu-iotests/078           |   1 -
 tests/qemu-iotests/079           |   1 -
 tests/qemu-iotests/080           |   1 -
 tests/qemu-iotests/081           |   1 -
 tests/qemu-iotests/082           |   1 -
 tests/qemu-iotests/083           |   1 -
 tests/qemu-iotests/084           |   1 -
 tests/qemu-iotests/086           |   1 -
 tests/qemu-iotests/087           |   1 -
 tests/qemu-iotests/088           |   1 -
 tests/qemu-iotests/089           |   1 -
 tests/qemu-iotests/090           |   1 -
 tests/qemu-iotests/092           |   1 -
 tests/qemu-iotests/094           |   1 -
 tests/qemu-iotests/097           |   1 -
 tests/qemu-iotests/098           |   1 -
 tests/qemu-iotests/099           |   1 -
 tests/qemu-iotests/100           |   1 -
 tests/qemu-iotests/101           |   1 -
 tests/qemu-iotests/102           |   1 -
 tests/qemu-iotests/103           |   1 -
 tests/qemu-iotests/104           |   1 -
 tests/qemu-iotests/105           |   1 -
 tests/qemu-iotests/107           |   1 -
 tests/qemu-iotests/108           |   1 -
 tests/qemu-iotests/109           |   1 -
 tests/qemu-iotests/110           |   1 -
 tests/qemu-iotests/111           |   1 -
 tests/qemu-iotests/112           |   1 -
 tests/qemu-iotests/113           |   1 -
 tests/qemu-iotests/114           |   1 -
 tests/qemu-iotests/115           |   1 -
 tests/qemu-iotests/116           |   1 -
 tests/qemu-iotests/117           |   1 -
 tests/qemu-iotests/119           |   1 -
 tests/qemu-iotests/120           |   1 -
 tests/qemu-iotests/121           |   1 -
 tests/qemu-iotests/122           |   1 -
 tests/qemu-iotests/123           |   1 -
 tests/qemu-iotests/128           |   1 -
 tests/qemu-iotests/130           |   1 -
 tests/qemu-iotests/131           |   1 -
 tests/qemu-iotests/133           |   1 -
 tests/qemu-iotests/134           |   1 -
 tests/qemu-iotests/135           |   1 -
 tests/qemu-iotests/137           |   1 -
 tests/qemu-iotests/138           |   1 -
 tests/qemu-iotests/140           |   1 -
 tests/qemu-iotests/141           |   1 -
 tests/qemu-iotests/142           |   1 -
 tests/qemu-iotests/143           |   1 -
 tests/qemu-iotests/145           |   1 -
 tests/qemu-iotests/150           |   1 -
 tests/qemu-iotests/common.config |   2 +-
 tests/qemu-iotests/common.filter | 101 --------------------------------------
 tests/qemu-iotests/common.rc     |  46 ------------------
 tests/qemu-iotests/iotests.py    |  14 ++++++
 130 files changed, 281 insertions(+), 353 deletions(-)
author
#1 lore raw

[Qemu-devel] [PULL 02/19] block: Fix blk_aio_write_zeroes()

Commit 57d6a428 broke blk_aio_write_zeroes() because in some write functions in the call path don't have an explicit length argument but reuse qiov->size instead. Which is great, except that write_zeroes doesn't have a qiov, which this commit interprets as 0 bytes. Consequently, blk_aio_write_zeroes() didn't effectively do anything.

This patch introduces an explicit acb->bytes in BlkAioEmAIOCB and uses that instead of acb->rwco.size.

The synchronous version of the function is okay because it does pass a qiov (with the right size and a NULL pointer as its base).

---
 block/block-backend.c      | 20 +++++++----
 tests/qemu-iotests/033     |  8 +++--
 tests/qemu-iotests/033.out | 82 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 100 insertions(+), 10 deletions(-)
block/block-backend.c +13 -7
index d74f670..140c3f7 100644
@@ -852,6 +852,7 @@ BlockAIOCB *blk_abort_aio_request(BlockBackend *blk,
 typedef struct BlkAioEmAIOCB {
     BlockAIOCB common;
     BlkRwCo rwco;
+    int bytes;
     bool has_returned;
     QEMUBH* bh;
 } BlkAioEmAIOCB;
@@ -877,7 +878,7 @@ static void blk_aio_complete_bh(void *opaque)
     blk_aio_complete(opaque);
 }
 
-static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset,
+static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset, int bytes,
                                 QEMUIOVector *qiov, CoroutineEntry co_entry,
                                 BdrvRequestFlags flags,
                                 BlockCompletionFunc *cb, void *opaque)
@@ -893,6 +894,7 @@ static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset,
         .flags  = flags,
         .ret    = NOT_DONE,
     };
+    acb->bytes = bytes;
     acb->bh = NULL;
     acb->has_returned = false;
 
@@ -913,7 +915,8 @@ static void blk_aio_read_entry(void *opaque)
     BlkAioEmAIOCB *acb = opaque;
     BlkRwCo *rwco = &acb->rwco;
 
-    rwco->ret = blk_co_preadv(rwco->blk, rwco->offset, rwco->qiov->size,
+    assert(rwco->qiov->size == acb->bytes);
+    rwco->ret = blk_co_preadv(rwco->blk, rwco->offset, acb->bytes,
                               rwco->qiov, rwco->flags);
     blk_aio_complete(acb);
 }
@@ -923,8 +926,8 @@ static void blk_aio_write_entry(void *opaque)
     BlkAioEmAIOCB *acb = opaque;
     BlkRwCo *rwco = &acb->rwco;
 
-    rwco->ret = blk_co_pwritev(rwco->blk, rwco->offset,
-                               rwco->qiov ? rwco->qiov->size : 0,
+    assert(!rwco->qiov || rwco->qiov->size == acb->bytes);
+    rwco->ret = blk_co_pwritev(rwco->blk, rwco->offset, acb->bytes,
                                rwco->qiov, rwco->flags);
     blk_aio_complete(acb);
 }
@@ -937,7 +940,8 @@ BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
         return blk_abort_aio_request(blk, cb, opaque, -EINVAL);
     }
 
-    return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, NULL,
+    return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS,
+                        nb_sectors << BDRV_SECTOR_BITS, NULL,
                         blk_aio_write_entry, BDRV_REQ_ZERO_WRITE, cb, opaque);
 }
 
@@ -994,7 +998,8 @@ BlockAIOCB *blk_aio_readv(BlockBackend *blk, int64_t sector_num,
         return blk_abort_aio_request(blk, cb, opaque, -EINVAL);
     }
 
-    return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov,
+    assert(nb_sectors << BDRV_SECTOR_BITS == iov->size);
+    return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov->size, iov,
                         blk_aio_read_entry, 0, cb, opaque);
 }
 
@@ -1006,7 +1011,8 @@ BlockAIOCB *blk_aio_writev(BlockBackend *blk, int64_t sector_num,
         return blk_abort_aio_request(blk, cb, opaque, -EINVAL);
     }
 
-    return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov,
+    assert(nb_sectors << BDRV_SECTOR_BITS == iov->size);
+    return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS, iov->size, iov,
                         blk_aio_write_entry, 0, cb, opaque);
 }
 
tests/qemu-iotests/033 +5 -3
index a61d8ce..912373d 100755
@@ -57,12 +57,13 @@ do_test()
 	} | $QEMU_IO
 }
 
+for write_zero_cmd in "write -z" "aio_write -z"; do
 for align in 512 4k; do
 	echo
 	echo "== preparing image =="
 	do_test $align "write -P 0xa 0x200 0x400" "$TEST_IMG" | _filter_qemu_io
 	do_test $align "write -P 0xa 0x20000 0x600" "$TEST_IMG" | _filter_qemu_io
-	do_test $align "write -z 0x400 0x20000" "$TEST_IMG" | _filter_qemu_io
+	do_test $align "$write_zero_cmd 0x400 0x20000" "$TEST_IMG" | _filter_qemu_io
 
 	echo
 	echo "== verifying patterns (1) =="
@@ -73,7 +74,7 @@ for align in 512 4k; do
 	echo
 	echo "== rewriting zeroes =="
 	do_test $align "write -P 0xb 0x10000 0x10000" "$TEST_IMG" | _filter_qemu_io
-	do_test $align "write -z 0x10000 0x10000" "$TEST_IMG" | _filter_qemu_io
+	do_test $align "$write_zero_cmd 0x10000 0x10000" "$TEST_IMG" | _filter_qemu_io
 
 	echo
 	echo "== verifying patterns (2) =="
@@ -82,7 +83,7 @@ for align in 512 4k; do
 	echo
 	echo "== rewriting unaligned zeroes =="
 	do_test $align "write -P 0xb 0x0 0x1000" "$TEST_IMG" | _filter_qemu_io
-	do_test $align "write -z 0x200 0x200" "$TEST_IMG" | _filter_qemu_io
+	do_test $align "$write_zero_cmd 0x200 0x200" "$TEST_IMG" | _filter_qemu_io
 
 	echo
 	echo "== verifying patterns (3) =="
@@ -92,6 +93,7 @@ for align in 512 4k; do
 
 	echo
 done
+done
 
 # success, all done
 echo "*** done"
tests/qemu-iotests/033.out +82 -0

86 lines not on this page · raw message

Signature · 1 line
1.8.3.1
author
#2 lore raw

[Qemu-devel] [PULL 03/19] block/vpc: set errp in vpc_create

In reply to Kevin Wolf

From: Jeff Cody <[email protected]>

Add more useful error information to failure paths in vpc_create().

---
 block/vpc.c | 5 +++++
 1 file changed, 5 insertions(+)
block/vpc.c +5 -0
index 3713ec3..5aded1a 100644
@@ -874,6 +874,7 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
         } else if (!strcmp(disk_type_param, "fixed")) {
             disk_type = VHD_FIXED;
         } else {
+            error_setg(errp, "Invalid disk type, %s", disk_type_param);
             ret = -EINVAL;
             goto out;
         }
@@ -924,6 +925,7 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
         total_sectors = total_size / BDRV_SECTOR_SIZE;
         /* Allow a maximum disk size of approximately 2 TB */
         if (total_sectors > VHD_MAX_SECTORS) {
+            error_setg(errp, "Disk size is too large, max size is 2040 GiB");
             ret = -EFBIG;
             goto out;
         }
@@ -974,6 +976,9 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
     } else {
         ret = create_fixed_disk(blk, buf, total_size);
     }
+    if (ret < 0) {
+        error_setg(errp, "Unable to create or write VHD header");
+    }
 
 out:
     blk_unref(blk);
Signature · 1 line
1.8.3.1
author
#3 lore raw

[Qemu-devel] [PULL 05/19] block/vpc: use current_size field for XenConverter VHD images

In reply to Kevin Wolf

From: Jeff Cody <[email protected]>

XenConverter VHD images are another VHD image where current_size is different from the CHS values in the the format header. Use current_size as the default, by looking at the creator_app signature field.

---
 block/vpc.c | 2 ++
 1 file changed, 2 insertions(+)
block/vpc.c +2 -0
index 228f2c9..c9ebc4a 100644
@@ -300,6 +300,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
      *      'win '  :  current_size     Hyper-V
      *      'd2v '  :  current_size     Disk2vhd
      *      'tap\0' :  current_size     XenServer
+     *      'CTXS'  :  current_size     XenConverter
      *
      *  The user can override the table values via drive options, however
      *  even with an override we will still use current_size for images
@@ -308,6 +309,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
     use_chs = (!!strncmp(footer->creator_app, "win ", 4) &&
                !!strncmp(footer->creator_app, "qem2", 4) &&
                !!strncmp(footer->creator_app, "d2v ", 4) &&
+               !!strncmp(footer->creator_app, "CTXS", 4) &&
                !!memcmp(footer->creator_app, "tap", 4)) || s->force_use_chs;
 
     if (!use_chs || bs->total_sectors == VHD_MAX_GEOMETRY || s->force_use_sz) {
Signature · 1 line
1.8.3.1
author
#4 lore raw

[Qemu-devel] [PULL 04/19] vpc: use current_size field for XenServer VHD images

In reply to Kevin Wolf

From: Stefan Hajnoczi <[email protected]>

The vpc driver has two methods of determining virtual disk size. The correct one to use depends on the software that generated the image file. Add the XenServer creator_app signature so that image size is correctly detected for those images.

---
 block/vpc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
block/vpc.c +3 -1
index 5aded1a..228f2c9 100644
@@ -299,6 +299,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
      *      'qem2'  :  current_size     QEMU (uses current_size)
      *      'win '  :  current_size     Hyper-V
      *      'd2v '  :  current_size     Disk2vhd
+     *      'tap\0' :  current_size     XenServer
      *
      *  The user can override the table values via drive options, however
      *  even with an override we will still use current_size for images
@@ -306,7 +307,8 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
      */
     use_chs = (!!strncmp(footer->creator_app, "win ", 4) &&
                !!strncmp(footer->creator_app, "qem2", 4) &&
-               !!strncmp(footer->creator_app, "d2v ", 4)) || s->force_use_chs;
+               !!strncmp(footer->creator_app, "d2v ", 4) &&
+               !!memcmp(footer->creator_app, "tap", 4)) || s->force_use_chs;
 
     if (!use_chs || bs->total_sectors == VHD_MAX_GEOMETRY || s->force_use_sz) {
         bs->total_sectors = be64_to_cpu(footer->current_size) /
Signature · 1 line
1.8.3.1
author
#5 lore raw

[Qemu-devel] [PULL 06/19] block/vpc: Use the correct max sector count for VHD images

In reply to Kevin Wolf

From: Jeff Cody <[email protected]>

The old VHD_MAX_SECTORS value is incorrect, and is a throwback to the CHS calculations. The VHD specification allows images up to 2040 GiB, which (using 512 byte sectors) corresponds to a maximum number of sectors of 0xff000000, rather than the old value of 0xfe0001ff.

Update VHD_MAX_SECTORS to reflect the correct value.

Also, update comment references to the actual size limit, and correct one compare so that we can have sizes up to the limit.

---
 block/vpc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
block/vpc.c +5 -5
index c9ebc4a..03aee81 100644
@@ -52,7 +52,7 @@ enum vhd_type {
 #define VHD_CHS_MAX_H   16
 #define VHD_CHS_MAX_S   255
 
-#define VHD_MAX_SECTORS       (65535LL * 255 * 255)
+#define VHD_MAX_SECTORS       0xff000000    /* 2040 GiB max image size */
 #define VHD_MAX_GEOMETRY      (VHD_CHS_MAX_C * VHD_CHS_MAX_H * VHD_CHS_MAX_S)
 
 #define VPC_OPT_FORCE_SIZE "force_size"
@@ -317,8 +317,8 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
                                         BDRV_SECTOR_SIZE;
     }
 
-    /* Allow a maximum disk size of approximately 2 TB */
-    if (bs->total_sectors >= VHD_MAX_SECTORS) {
+    /* Allow a maximum disk size of 2040 GiB */
+    if (bs->total_sectors > VHD_MAX_SECTORS) {
         ret = -EFBIG;
         goto fail;
     }
@@ -722,7 +722,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs,
  * Note that the geometry doesn't always exactly match total_sectors but
  * may round it down.
  *
- * Returns 0 on success, -EFBIG if the size is larger than ~2 TB. Override
+ * Returns 0 on success, -EFBIG if the size is larger than 2040 GiB. Override
  * the hardware EIDE and ATA-2 limit of 16 heads (max disk size of 127 GB)
  * and instead allow up to 255 heads.
  */
@@ -927,7 +927,7 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
 
     if ((int64_t)cyls * heads * secs_per_cyl == VHD_MAX_GEOMETRY) {
         total_sectors = total_size / BDRV_SECTOR_SIZE;
-        /* Allow a maximum disk size of approximately 2 TB */
+        /* Allow a maximum disk size of 2040 GiB */
         if (total_sectors > VHD_MAX_SECTORS) {
             error_setg(errp, "Disk size is too large, max size is 2040 GiB");
             ret = -EFBIG;
Signature · 1 line
1.8.3.1
author
#6 lore raw

[Qemu-devel] [PULL 07/19] block/vpc: make checks on max table size a bit more lax

In reply to Kevin Wolf

From: Jeff Cody <[email protected]>

The check on the max_table_size field not being larger than required is valid, and in accordance with the VHD spec. However, there have been VHD images encountered in the wild that have an out-of-spec max table size that is technically too large.

There is no issue in allowing this larger table size, as we also later verify that the computed size (used for the pagetable) is large enough to fit all sectors. In addition, max_table_entries is bounds checked against SIZE_MAX and INT_MAX.

Remove the strict check, so that we can accomodate these sorts of images that are benignly out of spec.

---
 block/vpc.c | 4 ----
 1 file changed, 4 deletions(-)
block/vpc.c +0 -4
index 03aee81..0eef099 100644
@@ -351,10 +351,6 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
             ret = -EINVAL;
             goto fail;
         }
-        if (s->max_table_entries > (VHD_MAX_SECTORS * 512) / s->block_size) {
-            ret = -EINVAL;
-            goto fail;
-        }
 
         computed_size = (uint64_t) s->max_table_entries * s->block_size;
         if (computed_size < bs->total_sectors * 512) {
Signature · 1 line
1.8.3.1
author
#7 lore raw

[Qemu-devel] [PULL 01/19] qemu-io: Support 'aio_write -z'

In reply to Kevin Wolf

This allows testing blk_aio_write_zeroes().

---
 qemu-io-cmds.c | 65 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 49 insertions(+), 16 deletions(-)
qemu-io-cmds.c +49 -16
index 382faa8..e34f777 100644
@@ -1416,6 +1416,7 @@ struct aio_ctx {
     int vflag;
     int Cflag;
     int Pflag;
+    int zflag;
     BlockAcctCookie acct;
     int pattern;
     struct timeval t1;
@@ -1446,8 +1447,10 @@ static void aio_write_done(void *opaque, int ret)
     print_report("wrote", &t2, ctx->offset, ctx->qiov.size,
                  ctx->qiov.size, 1, ctx->Cflag);
 out:
-    qemu_io_free(ctx->buf);
-    qemu_iovec_destroy(&ctx->qiov);
+    if (!ctx->zflag) {
+        qemu_io_free(ctx->buf);
+        qemu_iovec_destroy(&ctx->qiov);
+    }
     g_free(ctx);
 }
 
@@ -1612,6 +1615,7 @@ static void aio_write_help(void)
 " -P, -- use different pattern to fill file\n"
 " -C, -- report statistics in a machine parsable format\n"
 " -q, -- quiet mode, do not show I/O statistics\n"
+" -z, -- write zeroes using blk_aio_write_zeroes\n"
 "\n");
 }
 
@@ -1622,7 +1626,7 @@ static const cmdinfo_t aio_write_cmd = {
     .cfunc      = aio_write_f,
     .argmin     = 2,
     .argmax     = -1,
-    .args       = "[-Cq] [-P pattern ] off len [len..]",
+    .args       = "[-Cqz] [-P pattern ] off len [len..]",
     .oneline    = "asynchronously writes a number of bytes",
     .help       = aio_write_help,
 };
@@ -1634,7 +1638,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
     struct aio_ctx *ctx = g_new0(struct aio_ctx, 1);
 
     ctx->blk = blk;
-    while ((c = getopt(argc, argv, "CqP:")) != -1) {
+    while ((c = getopt(argc, argv, "CqP:z")) != -1) {
         switch (c) {
         case 'C':
             ctx->Cflag = 1;
@@ -1649,6 +1653,9 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
                 return 0;
             }
             break;
+        case 'z':
+            ctx->zflag = 1;
+            break;
         default:
             g_free(ctx);
             return qemuio_command_usage(&aio_write_cmd);
@@ -1660,6 +1667,18 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
         return qemuio_command_usage(&aio_write_cmd);
     }
 
+    if (ctx->zflag && optind != argc - 2) {
+        printf("-z supports only a single length parameter\n");
+        g_free(ctx);
+        return 0;
+    }
+
+    if (ctx->zflag && ctx->Pflag) {
+        printf("-z and -P cannot be specified at the same time\n");
+        g_free(ctx);
+        return 0;
+    }
+
     ctx->offset = cvtnum(argv[optind]);
     if (ctx->offset < 0) {
         print_cvtnum_err(ctx->offset, argv[optind]);
@@ -1676,19 +1695,33 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
         return 0;
     }
 
-    nr_iov = argc - optind;
-    ctx->buf = create_iovec(blk, &ctx->qiov, &argv[optind], nr_iov, pattern);
-    if (ctx->buf == NULL) {
-        block_acct_invalid(blk_get_stats(blk), BLOCK_ACCT_WRITE);
-        g_free(ctx);
-        return 0;
-    }
+    if (ctx->zflag) {
+        int64_t count = cvtnum(argv[optind]);
+        if (count < 0) {
+            print_cvtnum_err(count, argv[optind]);
+            return 0;
+        }
 
-    gettimeofday(&ctx->t1, NULL);
-    block_acct_start(blk_get_stats(blk), &ctx->acct, ctx->qiov.size,
-                     BLOCK_ACCT_WRITE);
-    blk_aio_writev(blk, ctx->offset >> 9, &ctx->qiov,
-                   ctx->qiov.size >> 9, aio_write_done, ctx);
+        ctx->qiov.size = count;
+        blk_aio_write_zeroes(blk, ctx->offset >> 9, count >> 9, 0,
+                             aio_write_done, ctx);
+    } else {
+        nr_iov = argc - optind;
+        ctx->buf = create_iovec(blk, &ctx->qiov, &argv[optind], nr_iov,
+                                pattern);
+        if (ctx->buf == NULL) {
+            block_acct_invalid(blk_get_stats(blk), BLOCK_ACCT_WRITE);
+            g_free(ctx);
+            return 0;
+        }
+
+        gettimeofday(&ctx->t1, NULL);
+        block_acct_start(blk_get_stats(blk), &ctx->acct, ctx->qiov.size,
+                         BLOCK_ACCT_WRITE);
+
+        blk_aio_writev(blk, ctx->offset >> 9, &ctx->qiov,
+                       ctx->qiov.size >> 9, aio_write_done, ctx);
+    }
     return 0;
 }
 
Signature · 1 line
1.8.3.1
author
#8 lore raw

[Qemu-devel] [PULL 08/19] block/vpc: set errp in vpc_open

In reply to Kevin Wolf

From: Jeff Cody <[email protected]>

Add more useful error information to failure paths in vpc_open

---
 block/vpc.c | 9 +++++++++
 1 file changed, 9 insertions(+)
block/vpc.c +9 -0
index 0eef099..9475efb 100644
@@ -238,6 +238,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
 
     ret = bdrv_pread(bs->file->bs, 0, s->footer_buf, HEADER_SIZE);
     if (ret < 0) {
+        error_setg(errp, "Unable to read VHD header");
         goto fail;
     }
 
@@ -246,9 +247,11 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
         int64_t offset = bdrv_getlength(bs->file->bs);
         if (offset < 0) {
             ret = offset;
+            error_setg(errp, "Invalid file size");
             goto fail;
         } else if (offset < HEADER_SIZE) {
             ret = -EINVAL;
+            error_setg(errp, "File too small for a VHD header");
             goto fail;
         }
 
@@ -327,12 +330,14 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
         ret = bdrv_pread(bs->file->bs, be64_to_cpu(footer->data_offset), buf,
                          HEADER_SIZE);
         if (ret < 0) {
+            error_setg(errp, "Error reading dynamic VHD header");
             goto fail;
         }
 
         dyndisk_header = (VHDDynDiskHeader *) buf;
 
         if (strncmp(dyndisk_header->magic, "cxsparse", 8)) {
+            error_setg(errp, "Invalid header magic");
             ret = -EINVAL;
             goto fail;
         }
@@ -348,12 +353,14 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
         s->max_table_entries = be32_to_cpu(dyndisk_header->max_table_entries);
 
         if ((bs->total_sectors * 512) / s->block_size > 0xffffffffU) {
+            error_setg(errp, "Too many blocks");
             ret = -EINVAL;
             goto fail;
         }
 
         computed_size = (uint64_t) s->max_table_entries * s->block_size;
         if (computed_size < bs->total_sectors * 512) {
+            error_setg(errp, "Page table too small");
             ret = -EINVAL;
             goto fail;
         }
@@ -370,6 +377,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
 
         s->pagetable = qemu_try_blockalign(bs->file->bs, pagetable_size);
         if (s->pagetable == NULL) {
+            error_setg(errp, "Unable to allocate memory for page table");
             ret = -ENOMEM;
             goto fail;
         }
@@ -379,6 +387,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
         ret = bdrv_pread(bs->file->bs, s->bat_offset, s->pagetable,
                          pagetable_size);
         if (ret < 0) {
+            error_setg(errp, "Error reading pagetable");
             goto fail;
         }
 
Signature · 1 line
1.8.3.1
author
#9 lore raw

[Qemu-devel] [PULL 09/19] block/vpc: update comments to be compliant w/coding guidelines

In reply to Kevin Wolf

From: Jeff Cody <[email protected]>

---
 block/vpc.c | 68 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)
block/vpc.c +34 -34
index 9475efb..3e2ea69 100644
@@ -45,7 +45,7 @@ enum vhd_type {
     VHD_DIFFERENCING    = 4,
 };
 
-// Seconds since Jan 1, 2000 0:00:00 (UTC)
+/* Seconds since Jan 1, 2000 0:00:00 (UTC) */
 #define VHD_TIMESTAMP_BASE 946684800
 
 #define VHD_CHS_MAX_C   65535LL
@@ -57,22 +57,22 @@ enum vhd_type {
 
 #define VPC_OPT_FORCE_SIZE "force_size"
 
-// always big-endian
+/* always big-endian */
 typedef struct vhd_footer {
-    char        creator[8]; // "conectix"
+    char        creator[8]; /* "conectix" */
     uint32_t    features;
     uint32_t    version;
 
-    // Offset of next header structure, 0xFFFFFFFF if none
+    /* Offset of next header structure, 0xFFFFFFFF if none */
     uint64_t    data_offset;
 
-    // Seconds since Jan 1, 2000 0:00:00 (UTC)
+    /* Seconds since Jan 1, 2000 0:00:00 (UTC) */
     uint32_t    timestamp;
 
-    char        creator_app[4]; // "vpc "
+    char        creator_app[4]; /*  e.g., "vpc " */
     uint16_t    major;
     uint16_t    minor;
-    char        creator_os[4]; // "Wi2k"
+    char        creator_os[4]; /* "Wi2k" */
 
     uint64_t    orig_size;
     uint64_t    current_size;
@@ -83,29 +83,29 @@ typedef struct vhd_footer {
 
     uint32_t    type;
 
-    // Checksum of the Hard Disk Footer ("one's complement of the sum of all
-    // the bytes in the footer without the checksum field")
+    /* Checksum of the Hard Disk Footer ("one's complement of the sum of all
+       the bytes in the footer without the checksum field") */
     uint32_t    checksum;
 
-    // UUID used to identify a parent hard disk (backing file)
+    /* UUID used to identify a parent hard disk (backing file) */
     uint8_t     uuid[16];
 
     uint8_t     in_saved_state;
 } QEMU_PACKED VHDFooter;
 
 typedef struct vhd_dyndisk_header {
-    char        magic[8]; // "cxsparse"
+    char        magic[8]; /* "cxsparse" */
 
-    // Offset of next header structure, 0xFFFFFFFF if none
+    /* Offset of next header structure, 0xFFFFFFFF if none */
     uint64_t    data_offset;
 
-    // Offset of the Block Allocation Table (BAT)
+    /* Offset of the Block Allocation Table (BAT) */
     uint64_t    table_offset;
 
     uint32_t    version;
-    uint32_t    max_table_entries; // 32bit/entry
+    uint32_t    max_table_entries; /* 32bit/entry */
 
-    // 2 MB by default, must be a power of two
+    /* 2 MB by default, must be a power of two */
     uint32_t    block_size;
 
     uint32_t    checksum;
@@ -113,7 +113,7 @@ typedef struct vhd_dyndisk_header {
     uint32_t    parent_timestamp;
     uint32_t    reserved;
 
-    // Backing file name (in UTF-16)
+    /* Backing file name (in UTF-16) */
     uint8_t     parent_name[512];
 
     struct {
@@ -278,9 +278,9 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
     /* Write 'checksum' back to footer, or else will leave it with zero. */
     footer->checksum = cpu_to_be32(checksum);
 
-    // The visible size of a image in Virtual PC depends on the geometry
-    // rather than on the size stored in the footer (the size in the footer
-    // is too large usually)
+    /* The visible size of a image in Virtual PC depends on the geometry
+       rather than on the size stored in the footer (the size in the footer
+       is too large usually) */
     bs->total_sectors = (int64_t)
         be16_to_cpu(footer->cyls) * footer->heads * footer->secs_per_cyl;
 
@@ -466,16 +466,16 @@ static inline int64_t get_sector_offset(BlockDriverState *bs,
     pageentry_index = (offset % s->block_size) / 512;
 
     if (pagetable_index >= s->max_table_entries || s->pagetable[pagetable_index] == 0xffffffff)
-        return -1; // not allocated
+        return -1; /* not allocated */
 
     bitmap_offset = 512 * (uint64_t) s->pagetable[pagetable_index];
     block_offset = bitmap_offset + s->bitmap_size + (512 * pageentry_index);
 
-    // We must ensure that we don't write to any sectors which are marked as
-    // unused in the bitmap. We get away with setting all bits in the block
-    // bitmap each time we write to a new block. This might cause Virtual PC to
-    // miss sparse read optimization, but it's not a problem in terms of
-    // correctness.
+    /* We must ensure that we don't write to any sectors which are marked as
+       unused in the bitmap. We get away with setting all bits in the block
+       bitmap each time we write to a new block. This might cause Virtual PC to
+       miss sparse read optimization, but it's not a problem in terms of
+       correctness. */
     if (write && (s->last_bitmap_offset != bitmap_offset)) {
         uint8_t bitmap[s->bitmap_size];
 
@@ -521,18 +521,18 @@ static int64_t alloc_block(BlockDriverState* bs, int64_t sector_num)
     int ret;
     uint8_t bitmap[s->bitmap_size];
 
-    // Check if sector_num is valid
+    /* Check if sector_num is valid */
     if ((sector_num < 0) || (sector_num > bs->total_sectors))
         return -1;
 
-    // Write entry into in-memory BAT
+    /* Write entry into in-memory BAT */
     index = (sector_num * 512) / s->block_size;
     if (s->pagetable[index] != 0xFFFFFFFF)
         return -1;
 
     s->pagetable[index] = s->free_data_block_offset / 512;
 
-    // Initialize the block's bitmap
+    /* Initialize the block's bitmap */
     memset(bitmap, 0xff, s->bitmap_size);
     ret = bdrv_pwrite_sync(bs->file->bs, s->free_data_block_offset, bitmap,
         s->bitmap_size);
@@ -540,13 +540,13 @@ static int64_t alloc_block(BlockDriverState* bs, int64_t sector_num)
         return ret;
     }
 
-    // Write new footer (the old one will be overwritten)
+    /* Write new footer (the old one will be overwritten) */
     s->free_data_block_offset += s->block_size + s->bitmap_size;
     ret = rewrite_footer(bs);
     if (ret < 0)
         goto fail;
 
-    // Write BAT entry to disk
+    /* Write BAT entry to disk */
     bat_offset = s->bat_offset + (4 * index);
     bat_value = cpu_to_be32(s->pagetable[index]);
     ret = bdrv_pwrite_sync(bs->file->bs, bat_offset, &bat_value, 4);
@@ -779,7 +779,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
     int ret;
     int64_t offset = 0;
 
-    // Write the footer (twice: at the beginning and at the end)
+    /* Write the footer (twice: at the beginning and at the end) */
     block_size = 0x200000;
     num_bat_entries = (total_sectors + block_size / 512) / (block_size / 512);
 
@@ -794,7 +794,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
         goto fail;
     }
 
-    // Write the initial BAT
+    /* Write the initial BAT */
     offset = 3 * 512;
 
     memset(buf, 0xFF, 512);
@@ -806,7 +806,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
         offset += 512;
     }
 
-    // Prepare the Dynamic Disk Header
+    /* Prepare the Dynamic Disk Header */
     memset(buf, 0, 1024);
 
     memcpy(dyndisk_header->magic, "cxsparse", 8);
@@ -823,7 +823,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf,
 
     dyndisk_header->checksum = cpu_to_be32(vpc_checksum(buf, 1024));
 
-    // Write the header
+    /* Write the header */
     offset = 512;
 
     ret = blk_pwrite(blk, offset, buf, 1024);
Signature · 1 line
1.8.3.1
author
#10 lore raw

[Qemu-devel] [PULL 10/19] block: Don't ignore flags in blk_{, co, aio}_write_zeroes()

In reply to Kevin Wolf

Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(), which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be ignored).

Commit fc1453cd introduced the same bug for blk_write_zeroes(). This is used for 'qemu-img convert' without has_zero_init (e.g. on a block device) and for preallocation=falloc in parallels.

Commit 8896e088 is the version for blk_co_write_zeroes(). This function is only used in qemu-io.

---
 block/block-backend.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
block/block-backend.c +4 -3
index 140c3f7..16c9d5e 100644
@@ -820,7 +820,7 @@ int blk_write_zeroes(BlockBackend *blk, int64_t sector_num,
                      int nb_sectors, BdrvRequestFlags flags)
 {
     return blk_rw(blk, sector_num, NULL, nb_sectors, blk_write_entry,
-                  BDRV_REQ_ZERO_WRITE);
+                  flags | BDRV_REQ_ZERO_WRITE);
 }
 
 static void error_callback_bh(void *opaque)
@@ -942,7 +942,8 @@ BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
 
     return blk_aio_prwv(blk, sector_num << BDRV_SECTOR_BITS,
                         nb_sectors << BDRV_SECTOR_BITS, NULL,
-                        blk_aio_write_entry, BDRV_REQ_ZERO_WRITE, cb, opaque);
+                        blk_aio_write_entry, flags | BDRV_REQ_ZERO_WRITE,
+                        cb, opaque);
 }
 
 int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count)
@@ -1452,7 +1453,7 @@ int coroutine_fn blk_co_write_zeroes(BlockBackend *blk, int64_t sector_num,
 
     return blk_co_pwritev(blk, sector_num << BDRV_SECTOR_BITS,
                           nb_sectors << BDRV_SECTOR_BITS, NULL,
-                          BDRV_REQ_ZERO_WRITE);
+                          flags | BDRV_REQ_ZERO_WRITE);
 }
 
 int blk_write_compressed(BlockBackend *blk, int64_t sector_num,
Signature · 1 line
1.8.3.1
author
#11 lore raw

[Qemu-devel] [PULL 11/19] Fix pflash migration

In reply to Kevin Wolf

From: "Dr. David Alan Gilbert" <[email protected]>

Pflash migration (e.g. q35 + EFI variable storage) fails with the assert:

bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed.

This avoids the problem by delaying the pflash update until after the device loads complete.

Tested by:
Migrating Q35/EFI vm.
Changing efi variable content (with efiboot in the guest) md5sum'ing the variable file before migration and after.

This is a fix that Paolo posted in the message
[email protected]

---
 hw/block/pflash_cfi01.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
hw/block/pflash_cfi01.c +16 -2
index c475c2a..106a775 100644
@@ -46,6 +46,7 @@
 #include "exec/address-spaces.h"
 #include "qemu/host-utils.h"
 #include "hw/sysbus.h"
+#include "sysemu/sysemu.h"
 
 #define PFLASH_BUG(fmt, ...) \
 do { \
@@ -97,6 +98,7 @@ struct pflash_t {
     MemoryRegion mem;
     char *name;
     void *storage;
+    VMChangeStateEntry *vmstate;
 };
 
 static int pflash_post_load(void *opaque, int version_id);
@@ -944,13 +946,25 @@ MemoryRegion *pflash_cfi01_get_memory(pflash_t *fl)
     return &fl->mem;
 }
 
+static void postload_update_cb(void *opaque, int running, RunState state)
+{
+    pflash_t *pfl = opaque;
+
+    /* This is called after bdrv_invalidate_cache_all.  */
+    qemu_del_vm_change_state_handler(pfl->vmstate);
+    pfl->vmstate = NULL;
+
+    DPRINTF("%s: updating bdrv for %s\n", __func__, pfl->name);
+    pflash_update(pfl, 0, pfl->sector_len * pfl->nb_blocs);
+}
+
 static int pflash_post_load(void *opaque, int version_id)
 {
     pflash_t *pfl = opaque;
 
     if (!pfl->ro) {
-        DPRINTF("%s: updating bdrv for %s\n", __func__, pfl->name);
-        pflash_update(pfl, 0, pfl->sector_len * pfl->nb_blocs);
+        pfl->vmstate = qemu_add_vm_change_state_handler(postload_update_cb,
+                                                        pfl);
     }
     return 0;
 }
Signature · 1 line
1.8.3.1
author
#12 lore raw

[Qemu-devel] [PULL 13/19] qemu-iotests: common.rc: drop unused _do()

In reply to Kevin Wolf

From: Sascha Silbe <[email protected]>

_do() was never used and possibly creates temporary files at predictable, world-writable locations. Get rid of it.

Message-id: [email protected]

---
 tests/qemu-iotests/common.rc | 46 --------------------------------------------
 1 file changed, 46 deletions(-)
tests/qemu-iotests/common.rc +0 -46
index d9913f8..5249ec5 100644
@@ -287,52 +287,6 @@ _need_to_be_root()
     fi
 }
 
-
-# Do a command, log it to $seq.full, optionally test return status
-# and die if command fails. If called with one argument _do executes the
-# command, logs it, and returns its exit status. With two arguments _do
-# first prints the message passed in the first argument, and then "done"
-# or "fail" depending on the return status of the command passed in the
-# second argument. If the command fails and the variable _do_die_on_error
-# is set to "always" or the two argument form is used and _do_die_on_error
-# is set to "message_only" _do will print an error message to
-# $seq.out and exit.
-
-_do()
-{
-    if [ $# -eq 1 ]; then
-        _cmd=$1
-    elif [ $# -eq 2 ]; then
-        _note=$1
-        _cmd=$2
-        echo -n "$_note... "
-    else
-        echo "Usage: _do [note] cmd" 1>&2
-        status=1; exit
-    fi
-
-    (eval "echo '---' \"$_cmd\"") >>"$OUTPUT_DIR/$seq.full"
-    (eval "$_cmd") >$tmp._out 2>&1; ret=$?
-    cat $tmp._out >>"$OUTPUT_DIR/$seq.full"
-    if [ $# -eq 2 ]; then
-        if [ $ret -eq 0 ]; then
-            echo "done"
-        else
-            echo "fail"
-        fi
-    fi
-    if [ $ret -ne 0  ] \
-        && [ "$_do_die_on_error" = "always" \
-            -o \( $# -eq 2 -a "$_do_die_on_error" = "message_only" \) ]
-    then
-        [ $# -ne 2 ] && echo
-        eval "echo \"$_cmd\" failed \(returned $ret\): see $seq.full"
-        status=1; exit
-    fi
-
-    return $ret
-}
-
 # bail out, setting up .notrun file
 #
 _notrun()
Signature · 1 line
1.8.3.1
author
#13 lore raw

[Qemu-devel] [PULL 12/19] qemu-iotests: drop unused _within_tolerance() filter

In reply to Kevin Wolf

From: Sascha Silbe <[email protected]>

_within_tolerance() isn't used anymore and possibly creates temporary files at predictable, world-writable locations. Get rid of it.

If it's needed again in the future it can be revived easily and fixed up to use TEST_DIR and / or safely created temporary files.

Message-id: [email protected]

---
 tests/qemu-iotests/common.filter | 101 ---------------------------------------
 1 file changed, 101 deletions(-)
tests/qemu-iotests/common.filter +0 -101
index 84b7434..8a6e1b5 100644
@@ -19,107 +19,6 @@
 # standard filters
 #
 
-# Checks that given_value is in range of correct_value +/- tolerance.
-# Tolerance can be an absolute value or a percentage of the correct value
-# (see examples with tolerances below).
-# Outputs suitable message to stdout if it's not in range.
-#
-# A verbose option, -v, may be used as the LAST argument
-#
-# e.g.
-# foo: 0.0298 = 0.03 +/- 5%
-# _within_tolerance "foo" 0.0298 0.03 5%
-#
-# foo: 0.0298 = 0.03 +/- 0.01
-# _within_tolerance "foo" 0.0298 0.03 0.01
-#
-# foo: 0.0298 = 0.03 -0.01 +0.002
-# _within_tolerance "foo" 0.0298 0.03 0.01 0.002
-#
-# foo: verbose output of 0.0298 = 0.03 +/- 5%
-# _within_tolerance "foo" 0.0298 0.03 5% -v
-_within_tolerance()
-{
-  _name=$1
-  _given_val=$2
-  _correct_val=$3
-  _mintol=$4
-  _maxtol=$_mintol
-  _verbose=0
-  _debug=false
-
-  # maxtol arg is optional
-  # verbose arg is optional
-  if [ $# -ge 5 ]
-  then
-     if [ "$5" = "-v" ]
-     then
-        _verbose=1
-     else
-        _maxtol=$5
-     fi
-  fi
-  if [ $# -ge 6 ]
-  then
-     [ "$6" = "-v" ] && _verbose=1
-  fi
-
-  # find min with or without %
-  _mintolerance=`echo $_mintol | sed -e 's/%//'`
-  if [ $_mintol = $_mintolerance ]
-  then
-      _min=`echo "scale=5; $_correct_val-$_mintolerance" | bc`
-  else
-      _min=`echo "scale=5; $_correct_val-$_mintolerance*0.01*$_correct_val" | bc`
-  fi
-
-  # find max with or without %
-  _maxtolerance=`echo $_maxtol | sed -e 's/%//'`
-  if [ $_maxtol = $_maxtolerance ]
-  then
-      _max=`echo "scale=5; $_correct_val+$_maxtolerance" | bc`
-  else
-      _max=`echo "scale=5; $_correct_val+$_maxtolerance*0.01*$_correct_val" | bc`
-  fi
-
-  $_debug && echo "min = $_min"
-  $_debug && echo "max = $_max"
-
-  cat <<EOF >$tmp.bc.1
-scale=5;
-if ($_min <= $_given_val) 1;
-if ($_min > $_given_val) 0;
-EOF
-
-  cat <<EOF >$tmp.bc.2
-scale=5;
-if ($_given_val <= $_max) 1;
-if ($_given_val > $_max) 0;
-EOF
-
-  _above_min=`bc <$tmp.bc.1`
-  _below_max=`bc <$tmp.bc.2`
-
-  rm -f $tmp.bc.[12]
-
-  _in_range=`expr $_above_min \& $_below_max`
-
-  # fix up min, max precision for output
-  # can vary for 5.3, 6.2
-  _min=`echo $_min | sed -e 's/0*$//'` # get rid of trailling zeroes
-  _max=`echo $_max | sed -e 's/0*$//'` # get rid of trailling zeroes
-
-  if [ $_in_range -eq 1 ]
-  then
-        [ $_verbose -eq 1 ] && echo $_name is in range
-        return 0
-  else
-        [ $_verbose -eq 1 ] && echo $_name has value of $_given_val
-        [ $_verbose -eq 1 ] && echo $_name is NOT in range $_min .. $_max
-        return 1
-  fi
-}
-
 # ctime(3) dates
 #
 _filter_date()
Signature · 1 line
1.8.3.1
author
#14 lore raw

[Qemu-devel] [PULL 15/19] qemu-iotests: place valgrind log file in scratch dir

In reply to Kevin Wolf

From: Sascha Silbe <[email protected]>

Do not place the valgrind log file at a predictable path in a world-writable location. Use the common scratch directory (${TEST_DIR}) instead.

Message-id: [email protected]

---
 tests/qemu-iotests/common.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/common.config +1 -1
index 60bfabf..f824651 100644
@@ -122,7 +122,7 @@ _qemu_img_wrapper()
 
 _qemu_io_wrapper()
 {
-    local VALGRIND_LOGFILE=/tmp/$$.valgrind
+    local VALGRIND_LOGFILE="${TEST_DIR}"/$$.valgrind
     local RETVAL
     (
         if [ "${VALGRIND_QEMU}" == "y" ]; then
Signature · 1 line
1.8.3.1
author
#15 lore raw

[Qemu-devel] [PULL 17/19] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

In reply to Kevin Wolf

From: Eric Blake <[email protected]>

The NBD Protocol states that NBD_REP_SERVER may set 'length > sizeof(namelen) + namelen'; in which case the rest of the packet is a UTF-8 description of the export. While we don't know of any NBD servers that send this description yet, we had better consume the data so we don't choke when we start to talk to such a server.

Also, a (buggy/malicious) server that replies with length < sizeof(namelen) would cause us to block waiting for bytes that the server is not sending, and one that replies with super-huge lengths could cause us to temporarily allocate up to 4G memory. Sanity check things before blindly reading incorrectly.

Message-id: [email protected]

---
 nbd/client.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
nbd/client.c +21 -2
index 6777e58..48f2a21 100644
@@ -192,13 +192,18 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp)
             return -1;
         }
     } else if (type == NBD_REP_SERVER) {
+        if (len < sizeof(namelen) || len > NBD_MAX_BUFFER_SIZE) {
+            error_setg(errp, "incorrect option length");
+            return -1;
+        }
         if (read_sync(ioc, &namelen, sizeof(namelen)) != sizeof(namelen)) {
             error_setg(errp, "failed to read option name length");
             return -1;
         }
         namelen = be32_to_cpu(namelen);
-        if (len != (namelen + sizeof(namelen))) {
-            error_setg(errp, "incorrect option mame length");
+        len -= sizeof(namelen);
+        if (len < namelen) {
+            error_setg(errp, "incorrect option name length");
             return -1;
         }
         if (namelen > 255) {
@@ -214,6 +219,20 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp)
             return -1;
         }
         (*name)[namelen] = '\0';
+        len -= namelen;
+        if (len) {
+            char *buf = g_malloc(len + 1);
+            if (read_sync(ioc, buf, len) != len) {
+                error_setg(errp, "failed to read export description");
+                g_free(*name);
+                g_free(buf);
+                *name = NULL;
+                return -1;
+            }
+            buf[len] = '\0';
+            TRACE("Ignoring export description: %s", buf);
+            g_free(buf);
+        }
     } else {
         error_setg(errp, "Unexpected reply type %x expected %x",
                    type, NBD_REP_SERVER);
Signature · 1 line
1.8.3.1
author
#16 lore raw

[Qemu-devel] [PULL 16/19] qemu-iotests: 041: More robust assertion on quorum node

In reply to Kevin Wolf

From: Fam Zheng <[email protected]>

Block nodes are now assigned names automatically, therefore the test case is fragile in using fixed indices in result. Introduce a method in iotests.py and do the matching more sensibly.

Message-id: [email protected]

---
 tests/qemu-iotests/041        | 12 ++++--------
 tests/qemu-iotests/iotests.py | 14 ++++++++++++++
 2 files changed, 18 insertions(+), 8 deletions(-)
tests/qemu-iotests/041 +4 -8
index c7da95d..b1c542f 100755
@@ -810,8 +810,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
         self.assert_qmp(result, 'return', {})
 
         self.complete_and_wait(drive="quorum0")
-        result = self.vm.qmp('query-named-block-nodes')
-        self.assert_qmp(result, 'return[0]/file', quorum_repair_img)
+        self.assert_has_block_node("repair0", quorum_repair_img)
         # TODO: a better test requiring some QEMU infrastructure will be added
         #       to check that this file is really driven by quorum
         self.vm.shutdown()
@@ -833,8 +832,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
         self.cancel_and_wait(drive="quorum0", force=True)
         # here we check that the last registered quorum file has not been
         # swapped out and unref
-        result = self.vm.qmp('query-named-block-nodes')
-        self.assert_qmp(result, 'return[1]/file', quorum_img3)
+        self.assert_has_block_node(None, quorum_img3)
         self.vm.shutdown()
 
     def test_cancel_after_ready(self):
@@ -850,10 +848,9 @@ class TestRepairQuorum(iotests.QMPTestCase):
         self.assert_qmp(result, 'return', {})
 
         self.wait_ready_and_cancel(drive="quorum0")
-        result = self.vm.qmp('query-named-block-nodes')
         # here we check that the last registered quorum file has not been
         # swapped out and unref
-        self.assert_qmp(result, 'return[1]/file', quorum_img3)
+        self.assert_has_block_node(None, quorum_img3)
         self.vm.shutdown()
         self.assertTrue(iotests.compare_images(quorum_img2, quorum_repair_img),
                         'target image does not match source after mirroring')
@@ -974,8 +971,7 @@ class TestRepairQuorum(iotests.QMPTestCase):
         self.assert_qmp(result, 'return', {})
 
         self.complete_and_wait(drive="quorum0")
-        result = self.vm.qmp('query-named-block-nodes')
-        self.assert_qmp(result, 'return[0]/file', quorum_repair_img)
+        self.assert_has_block_node("repair0", quorum_repair_img)
         # TODO: a better test requiring some QEMU infrastructure will be added
         #       to check that this file is really driven by quorum
         self.vm.shutdown()
tests/qemu-iotests/iotests.py +14 -0
index 0c0b533..d9ef60e 100644
@@ -348,6 +348,20 @@ class QMPTestCase(unittest.TestCase):
         result = self.vm.qmp('query-block-jobs')
         self.assert_qmp(result, 'return', [])
 
+    def assert_has_block_node(self, node_name=None, file_name=None):
+        """Issue a query-named-block-nodes and assert node_name and/or
+        file_name is present in the result"""
+        def check_equal_or_none(a, b):
+            return a == None or b == None or a == b
+        assert node_name or file_name
+        result = self.vm.qmp('query-named-block-nodes')
+        for x in result["return"]:
+            if check_equal_or_none(x.get("node-name"), node_name) and \
+                    check_equal_or_none(x.get("file"), file_name):
+                return
+        self.assertTrue(False, "Cannot find %s %s in result:\n%s" % \
+                (node_name, file_name, result))
+
     def cancel_and_wait(self, drive='drive0', force=False, resume=False):
         '''Cancel a block job and wait for it to finish, returning the event'''
         result = self.vm.qmp('block-job-cancel', device=drive, force=force)
Signature · 1 line
1.8.3.1
author
#17 lore raw

[Qemu-devel] [PULL 18/19] nbd: fix assert() on qemu-nbd stop

In reply to Kevin Wolf

From: Pavel Butsykin <[email protected]>

Quoted 1 line

From time to time qemu-nbd is crashing on the following assert:

    assert(state == TERMINATING);
    nbd_export_closed
    nbd_export_put
    main

and the state at the moment of the crash is evaluated to TERMINATE.

During shutdown process of the client the nbd_client_thread thread sends SIGTERM signal and the main thread calls the nbd_client_closed callback. If the SIGTERM callback will be executed after change the state to TERMINATING, then the state will once again be TERMINATE.

To solve the issue, we must change the state to TERMINATE only if the state is RUNNING. In the other case we are shutting down already.

Message-id: [email protected]

---
 qemu-nbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-nbd.c +1 -1
index b5751f8..2c9754e 100644
@@ -215,7 +215,7 @@ static int find_partition(BlockBackend *blk, int partition,
 
 static void termsig_handler(int signum)
 {
-    state = TERMINATE;
+    atomic_cmpxchg(&state, RUNNING, TERMINATE);
     qemu_notify_event();
 }
 
Signature · 1 line
1.8.3.1
author
#18 lore raw

[Qemu-devel] [PULL 19/19] nbd: Don't kill server on client that doesn't request TLS

In reply to Kevin Wolf

From: Eric Blake <[email protected]>

Upstream NBD documents (as of commit 4feebc95) that servers MAY choose to operate in a conditional mode, where it is up to the client whether to use TLS. For qemu's case, we want to always be in FORCEDTLS mode, because of the risk of man-in-the-middle attacks, and since we never export more than one device; likewise, the qemu client will ALWAYS send NBD_OPT_STARTTLS as its first option. But now that SELECTIVETLS servers exist, it is feasible to encounter a (non-qemu) client that is programmed to talk to such a server, and does not do NBD_OPT_STARTTLS first, but rather wants to probe if it can use a non-encrypted export.

The NBD protocol documents that we should let such a client continue trying, on the grounds that maybe the client will get the hint to send NBD_OPT_STARTTLS, rather than immediately dropping the connection.

Note that NBD_OPT_EXPORT_NAME is a special case: since it is the only option request that can't have an error return, we have to (continue to) drop the connection on that one; rather, what we are fixing here is that all other replies prior to TLS initiation tell the client NBD_REP_ERR_TLS_REQD, but keep the connection alive.

Message-id: [email protected]

---
 nbd/server.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
nbd/server.c +13 -2
index 2a4dd10..a13a691 100644
@@ -449,11 +449,19 @@ static int nbd_negotiate_options(NBDClient *client)
                 client->ioc = QIO_CHANNEL(tioc);
                 break;
 
+            case NBD_OPT_EXPORT_NAME:
+                /* No way to return an error to client, so drop connection */
+                TRACE("Option 0x%x not permitted before TLS", clientflags);
+                return -EINVAL;
+
             default:
                 TRACE("Option 0x%x not permitted before TLS", clientflags);
+                if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
+                    return -EIO;
+                }
                 nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_TLS_REQD,
                                        clientflags);
-                return -EINVAL;
+                break;
             }
         } else if (fixedNewstyle) {
             switch (clientflags) {
@@ -471,6 +479,9 @@ static int nbd_negotiate_options(NBDClient *client)
                 return nbd_negotiate_handle_export_name(client, length);
 
             case NBD_OPT_STARTTLS:
+                if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
+                    return -EIO;
+                }
                 if (client->tlscreds) {
                     TRACE("TLS already enabled");
                     nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_INVALID,
@@ -480,7 +491,7 @@ static int nbd_negotiate_options(NBDClient *client)
                     nbd_negotiate_send_rep(client->ioc, NBD_REP_ERR_POLICY,
                                            clientflags);
                 }
-                return -EINVAL;
+                break;
             default:
                 TRACE("Unsupported option 0x%x", clientflags);
                 if (nbd_negotiate_drop_sync(client->ioc, length) != length) {
Signature · 1 line
1.8.3.1
author
#19 lore raw

[Qemu-devel] [PULL 14/19] qemu-iotests: tests: do not set unused tmp variable

In reply to Kevin Wolf

From: Sascha Silbe <[email protected]>

The previous commit removed the last usage of ${tmp} inside the tests themselves; the only remaining users are sourced by check. So we can now drop this variable from the tests.

Message-id: [email protected]

---
 tests/qemu-iotests/001 | 1 -
 tests/qemu-iotests/002 | 1 -
 tests/qemu-iotests/003 | 1 -
 tests/qemu-iotests/004 | 1 -
 tests/qemu-iotests/005 | 1 -
 tests/qemu-iotests/007 | 1 -
 tests/qemu-iotests/008 | 1 -
 tests/qemu-iotests/009 | 1 -
 tests/qemu-iotests/010 | 1 -
 tests/qemu-iotests/011 | 1 -
 tests/qemu-iotests/012 | 1 -
 tests/qemu-iotests/013 | 1 -
 tests/qemu-iotests/014 | 1 -
 tests/qemu-iotests/015 | 1 -
 tests/qemu-iotests/017 | 1 -
 tests/qemu-iotests/018 | 1 -
 tests/qemu-iotests/019 | 1 -
 tests/qemu-iotests/020 | 1 -
 tests/qemu-iotests/021 | 1 -
 tests/qemu-iotests/022 | 1 -
 tests/qemu-iotests/023 | 1 -
 tests/qemu-iotests/024 | 1 -
 tests/qemu-iotests/025 | 1 -
 tests/qemu-iotests/026 | 1 -
 tests/qemu-iotests/027 | 1 -
 tests/qemu-iotests/028 | 1 -
 tests/qemu-iotests/029 | 1 -
 tests/qemu-iotests/031 | 1 -
 tests/qemu-iotests/032 | 1 -
 tests/qemu-iotests/033 | 1 -
 tests/qemu-iotests/034 | 1 -
 tests/qemu-iotests/035 | 1 -
 tests/qemu-iotests/036 | 1 -
 tests/qemu-iotests/037 | 1 -
 tests/qemu-iotests/038 | 1 -
 tests/qemu-iotests/039 | 1 -
 tests/qemu-iotests/042 | 1 -
 tests/qemu-iotests/043 | 1 -
 tests/qemu-iotests/046 | 1 -
 tests/qemu-iotests/047 | 1 -
 tests/qemu-iotests/049 | 1 -
 tests/qemu-iotests/050 | 1 -
 tests/qemu-iotests/051 | 1 -
 tests/qemu-iotests/052 | 1 -
 tests/qemu-iotests/053 | 1 -
 tests/qemu-iotests/054 | 1 -
 tests/qemu-iotests/058 | 1 -
 tests/qemu-iotests/059 | 1 -
 tests/qemu-iotests/060 | 1 -
 tests/qemu-iotests/061 | 1 -
 tests/qemu-iotests/062 | 1 -
 tests/qemu-iotests/063 | 1 -
 tests/qemu-iotests/064 | 1 -
 tests/qemu-iotests/066 | 1 -
 tests/qemu-iotests/067 | 1 -
 tests/qemu-iotests/068 | 1 -
 tests/qemu-iotests/069 | 1 -
 tests/qemu-iotests/070 | 1 -
 tests/qemu-iotests/071 | 1 -
 tests/qemu-iotests/072 | 1 -
 tests/qemu-iotests/073 | 1 -
 tests/qemu-iotests/075 | 1 -
 tests/qemu-iotests/076 | 1 -
 tests/qemu-iotests/077 | 1 -
 tests/qemu-iotests/078 | 1 -
 tests/qemu-iotests/079 | 1 -
 tests/qemu-iotests/080 | 1 -
 tests/qemu-iotests/081 | 1 -
 tests/qemu-iotests/082 | 1 -
 tests/qemu-iotests/083 | 1 -
 tests/qemu-iotests/084 | 1 -
 tests/qemu-iotests/086 | 1 -
 tests/qemu-iotests/087 | 1 -
 tests/qemu-iotests/088 | 1 -
 tests/qemu-iotests/089 | 1 -
 tests/qemu-iotests/090 | 1 -
 tests/qemu-iotests/092 | 1 -
 tests/qemu-iotests/094 | 1 -
 tests/qemu-iotests/097 | 1 -
 tests/qemu-iotests/098 | 1 -
 tests/qemu-iotests/099 | 1 -
 tests/qemu-iotests/100 | 1 -
 tests/qemu-iotests/101 | 1 -
 tests/qemu-iotests/102 | 1 -
 tests/qemu-iotests/103 | 1 -
 tests/qemu-iotests/104 | 1 -
 tests/qemu-iotests/105 | 1 -
 tests/qemu-iotests/107 | 1 -
 tests/qemu-iotests/108 | 1 -
 tests/qemu-iotests/109 | 1 -
 tests/qemu-iotests/110 | 1 -
 tests/qemu-iotests/111 | 1 -
 tests/qemu-iotests/112 | 1 -
 tests/qemu-iotests/113 | 1 -
 tests/qemu-iotests/114 | 1 -
 tests/qemu-iotests/115 | 1 -
 tests/qemu-iotests/116 | 1 -
 tests/qemu-iotests/117 | 1 -
 tests/qemu-iotests/119 | 1 -
 tests/qemu-iotests/120 | 1 -
 tests/qemu-iotests/121 | 1 -
 tests/qemu-iotests/122 | 1 -
 tests/qemu-iotests/123 | 1 -
 tests/qemu-iotests/128 | 1 -
 tests/qemu-iotests/130 | 1 -
 tests/qemu-iotests/131 | 1 -
 tests/qemu-iotests/133 | 1 -
 tests/qemu-iotests/134 | 1 -
 tests/qemu-iotests/135 | 1 -
 tests/qemu-iotests/137 | 1 -
 tests/qemu-iotests/138 | 1 -
 tests/qemu-iotests/140 | 1 -
 tests/qemu-iotests/141 | 1 -
 tests/qemu-iotests/142 | 1 -
 tests/qemu-iotests/143 | 1 -
 tests/qemu-iotests/145 | 1 -
 tests/qemu-iotests/150 | 1 -
 117 files changed, 117 deletions(-)
tests/qemu-iotests/001 +0 -1
index 4e16469..ffd14e2 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/002 +0 -1
index 6a865aa..d4f8e91 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/003 +0 -1
index 98638d4..19889b9 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/004 +0 -1
index 2ad77ed..67e1beb 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/005 +0 -1
index ba1236d..4447377 100755
@@ -28,7 +28,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/007 +0 -1
index 7b5aff5..fa543ee 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/008 +0 -1
index 2d28efd..8e89d74 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/009 +0 -1
index 57a43f5..16e4475 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/010 +0 -1
index 896a005..151dac2 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/011 +0 -1
index 1c5158a..f8d044e 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/012 +0 -1
index 7c5b689..d1d3f22 100755
@@ -27,7 +27,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/013 +0 -1
index ea3cab9..d013f87 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/014 +0 -1
index b23c2db..2ea79e8 100755
@@ -27,7 +27,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/015 +0 -1
index 6f26095..aaf9c3f 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/017 +0 -1
index 3af3cdf..e3f9e75 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/018 +0 -1
index 07b2de9..1d39d35 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/019 +0 -1
index 0937b5c..24a789a 100755
@@ -27,7 +27,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/020 +0 -1
index 6625b55..9c4a68c 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/021 +0 -1
index 1c69024..11e8ed7 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/022 +0 -1
index d35b816..2452a9f 100755
@@ -27,7 +27,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/023 +0 -1
index 9ad06b9..497ae1e 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/024 +0 -1
index 2c2d148..e0d77ce 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/025 +0 -1
index 467a4b7..c41370f 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/026 +0 -1
index ba1047c..f5a7f02 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/027 +0 -1
index 3fa81b8..08593da 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/028 +0 -1
index 4909b9b..7783e57 100755
@@ -28,7 +28,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/029 +0 -1
index b9cd826..e639ac0 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/031 +0 -1
index 2a77ba8..1e08abc 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/032 +0 -1
index b1ba5c3..24bcb52 100755
@@ -27,7 +27,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/033 +0 -1
index 912373d..16edcf2 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/034 +0 -1
index c769dd8..c711cfc 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/035 +0 -1
index ebe9b8c..efc38e4 100755
@@ -26,7 +26,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/036 +0 -1
index c4cc91b..ce638d6 100755
@@ -28,7 +28,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/037 +0 -1
index 5862451..c476b82 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/038 +0 -1
index 34fe698..d99a150 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/039 +0 -1
index 9e9b379..1f48339 100755
@@ -28,7 +28,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/042 +0 -1
index 94ce3a9..351b283 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/043 +0 -1
index b316b97..1c6c22d 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/046 +0 -1
index e0be46c..e528b67 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/047 +0 -1
index c35cd09..1b8f3d4 100755
@@ -26,7 +26,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/049 +0 -1
index 93aa0ea..fff0760 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/050 +0 -1
index 13006dd..03b4a5d 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/051 +0 -1
index 88b3d91..630cb7a 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/052 +0 -1
index 61959e2..4b64724 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/053 +0 -1
index e589e5f..2a04f5f 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/054 +0 -1
index bd94153..bf47ef9 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/058 +0 -1
index 63a6598..2253c6a 100755
@@ -27,7 +27,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket
tests/qemu-iotests/059 +0 -1
index 0332bbb..6655aaf 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/060 +0 -1
index c81319c..8e95c45 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/061 +0 -1
index e191e65..f5678b1 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/062 +0 -1
index 0511246..051fb9f 100755
@@ -26,7 +26,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/063 +0 -1
index a47493a..352e78c 100755
@@ -26,7 +26,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/064 +0 -1
index 7564563..5792fbb 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/066 +0 -1
index 1c2452b..364166d 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/067 +0 -1
index 77dec0d..c1df48e 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/068 +0 -1
index 7562dd7..68f6e82 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/069 +0 -1
index ce9e054..96e55ef 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/070 +0 -1
index d649ddf..8d08d74 100755
@@ -26,7 +26,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/071 +0 -1
index 92ab991..bdfd91f 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/072 +0 -1
index e4a723d..aa027c7 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/073 +0 -1
index 392db54..ad37a61 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/075 +0 -1
index 6117660..770d51c 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/076 +0 -1
index c9b55a9..ef9e6a4 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/077 +0 -1
index 8a7223f..4dc680b 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/078 +0 -1
index 7be2c3f..f333e9a 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/079 +0 -1
index ade6efa..b2e3f74 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/080 +0 -1
index a2c58ae..55044c7 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/081 +0 -1
index e4b4c6c..d89fabc 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/082 +0 -1
index c83e01e..ad1d9fa 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/083 +0 -1
index aa99278..bc724ae 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/084 +0 -1
index 733018d..04f2aa9 100755
@@ -26,7 +26,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/086 +0 -1
index 5527e86..cd4494a 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/087 +0 -1
index 27cbebc..e7bca37 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/088 +0 -1
index f9c3129..b8076f2 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/089 +0 -1
index 3e0038d..9bfe230 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/090 +0 -1
index 70b5a6f..7380503 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/092 +0 -1
index 52c529b..5bbdd07 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/094 +0 -1
index 57a68f8..0ba0b0c 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 trap "exit \$status" 0 1 2 3 15
tests/qemu-iotests/097 +0 -1
index c7a613b..01d8dd0 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/098 +0 -1
index e2230ad..b002e96 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/099 +0 -1
index 80f3d9a..caaf58e 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/100 +0 -1
index 7c1b235..5b2fb33 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/101 +0 -1
index 70fbf25..ea53f8b 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/102 +0 -1
index 161b197..64b4af9 100755
@@ -25,7 +25,6 @@ seq=$(basename $0)
 echo "QA output created by $seq"
 
 here=$PWD
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/103 +0 -1
index fa9a3c1..ecbd8eb 100755
@@ -25,7 +25,6 @@ seq=$(basename $0)
 echo "QA output created by $seq"
 
 here=$PWD
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/104 +0 -1
index 2e35ea8..726d467 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 trap "exit \$status" 0 1 2 3 15
tests/qemu-iotests/105 +0 -1
index 9bae49e..3db4ce3 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/107 +0 -1
index 9862030..d7222dc 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/108 +0 -1
index ce44749..2355d98 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/109 +0 -1
index 0b668da..f980b0c 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/110 +0 -1
index a687f95..9de7369 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/111 +0 -1
index 6011c94..a1c152d 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/112 +0 -1
index 34ba06a..28eb9aa 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/113 +0 -1
index a2cd96b..19b68b2 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/114 +0 -1
index d02e7ff..f110d4f 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/115 +0 -1
index a6be187..665c2ea 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/116 +0 -1
index 713ed48..df0172f 100755
@@ -28,7 +28,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/117 +0 -1
index 969750d..9385b3f 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/119 +0 -1
index cc6ec07..4f34fb4 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/120 +0 -1
index d899a3f..4f88a67 100755
@@ -26,7 +26,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/121 +0 -1
index 0912c3f..1307b4e 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/122 +0 -1
index 350ca9c..45b359c 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/123 +0 -1
index ad60803..b18e3fc 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/128 +0 -1
index 3d8107d..0976a18 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 devname="eiodev$$"
tests/qemu-iotests/130 +0 -1
index 9209992..ecc8a5b 100755
@@ -27,7 +27,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/131 +0 -1
index 4873f40..94a9ae7 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/133 +0 -1
index 8587102..9d35a6a 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/134 +0 -1
index 1c3820b..af618b8 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/135 +0 -1
index 16bf736..ce60831 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/137 +0 -1
index 9a6597c..e5e30de 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/138 +0 -1
index a5c3464..21650d8 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/140 +0 -1
index 05e4506..49f9df4 100755
@@ -29,7 +29,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/141 +0 -1
index f7c28b4..b2617e5 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/142 +0 -1
index 3828c23..29c0606 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/143 +0 -1
index 6207368..ec4ef22 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/145 +0 -1
index 7d8febb..1eca0e8 100755
@@ -25,7 +25,6 @@ seq=`basename $0`
 echo "QA output created by $seq"
 
 here=`pwd`
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/150 +0 -1
index 665373d..ee8f637 100755
@@ -25,7 +25,6 @@ seq="$(basename $0)"
 echo "QA output created by $seq"
 
 here="$PWD"
-tmp=/tmp/$$
 status=1	# failure is the default!
 
 _cleanup()
Signature · 1 line
1.8.3.1
#20 lore raw
In reply to Kevin Wolf
Quoted 9 lines · Kevin Wolf

The following changes since commit 538a467329818ea831f602491ac62d7d7999102a:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2016-04-15 10:49:04 +0100)

are available in the git repository at:

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

Quoted 7 lines

for you to fetch changes up to cdc8845331cf789636dfa88dc47e22fcdaef4057:

Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-04-15' into queue-block (2016-04-15 17:59:42 +0200)

----------------------------------------------------------------

Block layer patches for 2.6.0-rc3

Applied, thanks.

-- PMM