All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/12] Block patches
@ 2015-01-23 18:20 Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 01/12] virtio-blk: Pass req to virtio_blk_handle_scsi_req Kevin Wolf
                   ` (12 more replies)
  0 siblings, 13 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

The following changes since commit c6441452b50c44fdbb362b239ce623f77cf3cd51:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20150122-1' into staging (2015-01-22 18:57:36 +0000)

are available in the git repository at:


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

for you to fetch changes up to bc63781ca350cad4c9eb142ce8f55bfaded4276e:

  Merge remote-tracking branch 'mreitz/block' into queue-block (2015-01-23 18:51:47 +0100)

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

Block patches for 2.3

----------------------------------------------------------------
Fam Zheng (2):
      virtio-blk: Pass req to virtio_blk_handle_scsi_req
      virtio-blk: Use blk_aio_ioctl

Jeff Cody (7):
      block: vmdk - make ret variable usage clear
      block: vmdk - move string allocations from stack to the heap
      block: qapi - move string allocation from stack to the heap
      block: remove unused variable in bdrv_commit
      block: mirror - change string allocation to 2-bytes
      block: update string sizes for filename,backing_file,exact_filename
      block: vhdx - force FileOffsetMB field to '0' for certain block states

Kevin Wolf (1):
      Merge remote-tracking branch 'mreitz/block' into queue-block

Max Reitz (3):
      qcow2: Add two more unalignment checks
      iotests: Add tests for more corruption cases
      iotests: Lower 064's memory usage

 block.c                        |   3 -
 block/mirror.c                 |   3 +-
 block/qapi.c                   |   7 ++-
 block/qcow.c                   |   2 +-
 block/qcow2-cluster.c          |  21 +++++++
 block/qcow2.c                  |   3 +-
 block/vhdx.c                   |  13 +++-
 block/vmdk.c                   |  51 +++++++++-------
 block/vvfat.c                  |   4 +-
 hw/block/virtio-blk.c          | 134 ++++++++++++++++++++++++++---------------
 include/block/block_int.h      |   8 +--
 include/hw/virtio/virtio-blk.h |   3 -
 qemu-img.c                     |   4 +-
 tests/qemu-iotests/060         |  15 +++++
 tests/qemu-iotests/060.out     |  13 ++++
 tests/qemu-iotests/064         |  19 +++++-
 tests/qemu-iotests/064.out     |  34 +++++++++--
 17 files changed, 239 insertions(+), 98 deletions(-)

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 01/12] virtio-blk: Pass req to virtio_blk_handle_scsi_req
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 02/12] virtio-blk: Use blk_aio_ioctl Kevin Wolf
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Fam Zheng <famz@redhat.com>

In preparation for calling blk_aio_ioctl. Also make the function static
as no other files need it.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/block/virtio-blk.c          | 9 +++++----
 include/hw/virtio/virtio-blk.h | 3 ---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index b19b102..60cb1d8 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -127,12 +127,13 @@ static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
     return req;
 }
 
-int virtio_blk_handle_scsi_req(VirtIOBlock *blk,
-                               VirtQueueElement *elem)
+static int virtio_blk_handle_scsi_req(VirtIOBlockReq *req)
 {
     int status = VIRTIO_BLK_S_OK;
     struct virtio_scsi_inhdr *scsi = NULL;
-    VirtIODevice *vdev = VIRTIO_DEVICE(blk);
+    VirtIODevice *vdev = VIRTIO_DEVICE(req->dev);
+    VirtQueueElement *elem = &req->elem;
+    VirtIOBlock *blk = req->dev;
 
 #ifdef __linux__
     int i;
@@ -252,7 +253,7 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
 {
     int status;
 
-    status = virtio_blk_handle_scsi_req(req->dev, &req->elem);
+    status = virtio_blk_handle_scsi_req(req);
     virtio_blk_req_complete(req, status);
     virtio_blk_free_request(req);
 }
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index 3979dc4..4652b70 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -153,9 +153,6 @@ VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s);
 
 void virtio_blk_free_request(VirtIOBlockReq *req);
 
-int virtio_blk_handle_scsi_req(VirtIOBlock *blk,
-                               VirtQueueElement *elem);
-
 void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);
 
 void virtio_submit_multiwrite(BlockBackend *blk, MultiReqBuffer *mrb);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 02/12] virtio-blk: Use blk_aio_ioctl
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 01/12] virtio-blk: Pass req to virtio_blk_handle_scsi_req Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 03/12] qcow2: Add two more unalignment checks Kevin Wolf
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Fam Zheng <famz@redhat.com>

Use the asynchronous interface of ioctl. This will not make the VM
unresponsive if the ioctl takes a long time.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/block/virtio-blk.c | 125 +++++++++++++++++++++++++++++++-------------------
 1 file changed, 79 insertions(+), 46 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 60cb1d8..4032fca 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -115,6 +115,56 @@ static void virtio_blk_flush_complete(void *opaque, int ret)
     virtio_blk_free_request(req);
 }
 
+#ifdef __linux__
+
+typedef struct {
+    VirtIOBlockReq *req;
+    struct sg_io_hdr hdr;
+} VirtIOBlockIoctlReq;
+
+static void virtio_blk_ioctl_complete(void *opaque, int status)
+{
+    VirtIOBlockIoctlReq *ioctl_req = opaque;
+    VirtIOBlockReq *req = ioctl_req->req;
+    VirtIODevice *vdev = VIRTIO_DEVICE(req->dev);
+    struct virtio_scsi_inhdr *scsi;
+    struct sg_io_hdr *hdr;
+
+    scsi = (void *)req->elem.in_sg[req->elem.in_num - 2].iov_base;
+
+    if (status) {
+        status = VIRTIO_BLK_S_UNSUPP;
+        virtio_stl_p(vdev, &scsi->errors, 255);
+        goto out;
+    }
+
+    hdr = &ioctl_req->hdr;
+    /*
+     * From SCSI-Generic-HOWTO: "Some lower level drivers (e.g. ide-scsi)
+     * clear the masked_status field [hence status gets cleared too, see
+     * block/scsi_ioctl.c] even when a CHECK_CONDITION or COMMAND_TERMINATED
+     * status has occurred.  However they do set DRIVER_SENSE in driver_status
+     * field. Also a (sb_len_wr > 0) indicates there is a sense buffer.
+     */
+    if (hdr->status == 0 && hdr->sb_len_wr > 0) {
+        hdr->status = CHECK_CONDITION;
+    }
+
+    virtio_stl_p(vdev, &scsi->errors,
+                 hdr->status | (hdr->msg_status << 8) |
+                 (hdr->host_status << 16) | (hdr->driver_status << 24));
+    virtio_stl_p(vdev, &scsi->residual, hdr->resid);
+    virtio_stl_p(vdev, &scsi->sense_len, hdr->sb_len_wr);
+    virtio_stl_p(vdev, &scsi->data_len, hdr->dxfer_len);
+
+out:
+    virtio_blk_req_complete(req, status);
+    virtio_blk_free_request(req);
+    g_free(ioctl_req);
+}
+
+#endif
+
 static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
 {
     VirtIOBlockReq *req = virtio_blk_alloc_request(s);
@@ -137,7 +187,7 @@ static int virtio_blk_handle_scsi_req(VirtIOBlockReq *req)
 
 #ifdef __linux__
     int i;
-    struct sg_io_hdr hdr;
+    VirtIOBlockIoctlReq *ioctl_req;
 #endif
 
     /*
@@ -172,71 +222,52 @@ static int virtio_blk_handle_scsi_req(VirtIOBlockReq *req)
     }
 
 #ifdef __linux__
-    memset(&hdr, 0, sizeof(struct sg_io_hdr));
-    hdr.interface_id = 'S';
-    hdr.cmd_len = elem->out_sg[1].iov_len;
-    hdr.cmdp = elem->out_sg[1].iov_base;
-    hdr.dxfer_len = 0;
+    ioctl_req = g_new0(VirtIOBlockIoctlReq, 1);
+    ioctl_req->req = req;
+    ioctl_req->hdr.interface_id = 'S';
+    ioctl_req->hdr.cmd_len = elem->out_sg[1].iov_len;
+    ioctl_req->hdr.cmdp = elem->out_sg[1].iov_base;
+    ioctl_req->hdr.dxfer_len = 0;
 
     if (elem->out_num > 2) {
         /*
          * If there are more than the minimally required 2 output segments
          * there is write payload starting from the third iovec.
          */
-        hdr.dxfer_direction = SG_DXFER_TO_DEV;
-        hdr.iovec_count = elem->out_num - 2;
+        ioctl_req->hdr.dxfer_direction = SG_DXFER_TO_DEV;
+        ioctl_req->hdr.iovec_count = elem->out_num - 2;
 
-        for (i = 0; i < hdr.iovec_count; i++)
-            hdr.dxfer_len += elem->out_sg[i + 2].iov_len;
+        for (i = 0; i < ioctl_req->hdr.iovec_count; i++) {
+            ioctl_req->hdr.dxfer_len += elem->out_sg[i + 2].iov_len;
+        }
 
-        hdr.dxferp = elem->out_sg + 2;
+        ioctl_req->hdr.dxferp = elem->out_sg + 2;
 
     } else if (elem->in_num > 3) {
         /*
          * If we have more than 3 input segments the guest wants to actually
          * read data.
          */
-        hdr.dxfer_direction = SG_DXFER_FROM_DEV;
-        hdr.iovec_count = elem->in_num - 3;
-        for (i = 0; i < hdr.iovec_count; i++)
-            hdr.dxfer_len += elem->in_sg[i].iov_len;
+        ioctl_req->hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+        ioctl_req->hdr.iovec_count = elem->in_num - 3;
+        for (i = 0; i < ioctl_req->hdr.iovec_count; i++) {
+            ioctl_req->hdr.dxfer_len += elem->in_sg[i].iov_len;
+        }
 
-        hdr.dxferp = elem->in_sg;
+        ioctl_req->hdr.dxferp = elem->in_sg;
     } else {
         /*
          * Some SCSI commands don't actually transfer any data.
          */
-        hdr.dxfer_direction = SG_DXFER_NONE;
+        ioctl_req->hdr.dxfer_direction = SG_DXFER_NONE;
     }
 
-    hdr.sbp = elem->in_sg[elem->in_num - 3].iov_base;
-    hdr.mx_sb_len = elem->in_sg[elem->in_num - 3].iov_len;
-
-    status = blk_ioctl(blk->blk, SG_IO, &hdr);
-    if (status) {
-        status = VIRTIO_BLK_S_UNSUPP;
-        goto fail;
-    }
+    ioctl_req->hdr.sbp = elem->in_sg[elem->in_num - 3].iov_base;
+    ioctl_req->hdr.mx_sb_len = elem->in_sg[elem->in_num - 3].iov_len;
 
-    /*
-     * From SCSI-Generic-HOWTO: "Some lower level drivers (e.g. ide-scsi)
-     * clear the masked_status field [hence status gets cleared too, see
-     * block/scsi_ioctl.c] even when a CHECK_CONDITION or COMMAND_TERMINATED
-     * status has occurred.  However they do set DRIVER_SENSE in driver_status
-     * field. Also a (sb_len_wr > 0) indicates there is a sense buffer.
-     */
-    if (hdr.status == 0 && hdr.sb_len_wr > 0) {
-        hdr.status = CHECK_CONDITION;
-    }
-
-    virtio_stl_p(vdev, &scsi->errors,
-                 hdr.status | (hdr.msg_status << 8) |
-                 (hdr.host_status << 16) | (hdr.driver_status << 24));
-    virtio_stl_p(vdev, &scsi->residual, hdr.resid);
-    virtio_stl_p(vdev, &scsi->sense_len, hdr.sb_len_wr);
-    virtio_stl_p(vdev, &scsi->data_len, hdr.dxfer_len);
-
-    return status;
+    blk_aio_ioctl(blk->blk, SG_IO, &ioctl_req->hdr,
+                  virtio_blk_ioctl_complete, ioctl_req);
+    return -EINPROGRESS;
 #else
     abort();
 #endif
@@ -254,8 +285,10 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
     int status;
 
     status = virtio_blk_handle_scsi_req(req);
-    virtio_blk_req_complete(req, status);
-    virtio_blk_free_request(req);
+    if (status != -EINPROGRESS) {
+        virtio_blk_req_complete(req, status);
+        virtio_blk_free_request(req);
+    }
 }
 
 void virtio_submit_multiwrite(BlockBackend *blk, MultiReqBuffer *mrb)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 03/12] qcow2: Add two more unalignment checks
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 01/12] virtio-blk: Pass req to virtio_blk_handle_scsi_req Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 02/12] virtio-blk: Use blk_aio_ioctl Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 04/12] iotests: Add tests for more corruption cases Kevin Wolf
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Max Reitz <mreitz@redhat.com>

This adds checks for unaligned L2 table offsets and unaligned data
cluster offsets (actually the preallocated offsets for zero clusters) to
the zero cluster expansion function.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/qcow2-cluster.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 1fea514..183177d 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -1651,6 +1651,14 @@ static int expand_zero_clusters_in_l1(BlockDriverState *bs, uint64_t *l1_table,
             continue;
         }
 
+        if (offset_into_cluster(s, l2_offset)) {
+            qcow2_signal_corruption(bs, true, -1, -1, "L2 table offset %#"
+                                    PRIx64 " unaligned (L1 index: %#x)",
+                                    l2_offset, i);
+            ret = -EIO;
+            goto fail;
+        }
+
         if (is_active_l1) {
             /* get active L2 tables from cache */
             ret = qcow2_cache_get(bs, s->l2_table_cache, l2_offset,
@@ -1709,6 +1717,19 @@ static int expand_zero_clusters_in_l1(BlockDriverState *bs, uint64_t *l1_table,
                 }
             }
 
+            if (offset_into_cluster(s, offset)) {
+                qcow2_signal_corruption(bs, true, -1, -1, "Data cluster offset "
+                                        "%#" PRIx64 " unaligned (L2 offset: %#"
+                                        PRIx64 ", L2 index: %#x)", offset,
+                                        l2_offset, j);
+                if (!preallocated) {
+                    qcow2_free_clusters(bs, offset, s->cluster_size,
+                                        QCOW2_DISCARD_ALWAYS);
+                }
+                ret = -EIO;
+                goto fail;
+            }
+
             ret = qcow2_pre_write_overlap_check(bs, 0, offset, s->cluster_size);
             if (ret < 0) {
                 if (!preallocated) {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 04/12] iotests: Add tests for more corruption cases
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (2 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 03/12] qcow2: Add two more unalignment checks Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 05/12] block: vmdk - make ret variable usage clear Kevin Wolf
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Max Reitz <mreitz@redhat.com>

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/060     | 15 +++++++++++++++
 tests/qemu-iotests/060.out | 13 +++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 73863bf..c81319c 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -186,6 +186,12 @@ $QEMU_IO -c "write 0 64k" "$TEST_IMG" | _filter_qemu_io
 poke_file "$TEST_IMG" "$l1_offset" "\x80\x00\x00\x00\x00\x04\x2a\x00"
 $QEMU_IO -c "read 0 64k" "$TEST_IMG" | _filter_qemu_io
 
+# Test how well zero cluster expansion can cope with this
+_make_test_img 64M
+$QEMU_IO -c "write 0 64k" "$TEST_IMG" | _filter_qemu_io
+poke_file "$TEST_IMG" "$l1_offset" "\x80\x00\x00\x00\x00\x04\x2a\x00"
+$QEMU_IMG amend -o compat=0.10 "$TEST_IMG"
+
 echo
 echo "=== Testing unaligned L2 entry ==="
 echo
@@ -195,6 +201,15 @@ poke_file "$TEST_IMG" "$l2_offset" "\x80\x00\x00\x00\x00\x05\x2a\x00"
 $QEMU_IO -c "read 0 64k" "$TEST_IMG" | _filter_qemu_io
 
 echo
+echo "=== Testing unaligned pre-allocated zero cluster ==="
+echo
+_make_test_img 64M
+$QEMU_IO -c "write 0 64k" "$TEST_IMG" | _filter_qemu_io
+poke_file "$TEST_IMG" "$l2_offset" "\x80\x00\x00\x00\x00\x05\x2a\x01"
+# zero cluster expansion
+$QEMU_IMG amend -o compat=0.10 "$TEST_IMG"
+
+echo
 echo "=== Testing unaligned reftable entry ==="
 echo
 _make_test_img 64M
diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out
index 7d493bb..dc9f6b7 100644
--- a/tests/qemu-iotests/060.out
+++ b/tests/qemu-iotests/060.out
@@ -123,6 +123,11 @@ wrote 65536/65536 bytes at offset 0
 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed
 read failed: Input/output error
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
+wrote 65536/65536 bytes at offset 0
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qcow2: Marking image as corrupt: L2 table offset 0x42a00 unaligned (L1 index: 0); further corruption events will be suppressed
+qemu-img: Error while amending options: Input/output error
 
 === Testing unaligned L2 entry ===
 
@@ -132,6 +137,14 @@ wrote 65536/65536 bytes at offset 0
 qcow2: Marking image as corrupt: Data cluster offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed
 read failed: Input/output error
 
+=== Testing unaligned pre-allocated zero cluster ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
+wrote 65536/65536 bytes at offset 0
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qcow2: Marking image as corrupt: Data cluster offset 0x52a00 unaligned (L2 offset: 0x40000, L2 index: 0); further corruption events will be suppressed
+qemu-img: Error while amending options: Input/output error
+
 === Testing unaligned reftable entry ===
 
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 05/12] block: vmdk - make ret variable usage clear
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (3 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 04/12] iotests: Add tests for more corruption cases Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 06/12] block: vmdk - move string allocations from stack to the heap Kevin Wolf
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

Keep the variable 'ret' something that is returned by the function it is
defined in.  For the return value of 'sscanf', use a more meaningful
variable name.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/vmdk.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index 52cb888..dc6459c 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -785,6 +785,7 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
                               const char *desc_file_path, Error **errp)
 {
     int ret;
+    int matches;
     char access[11];
     char type[11];
     char fname[512];
@@ -796,6 +797,7 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
     BDRVVmdkState *s = bs->opaque;
     VmdkExtent *extent;
 
+
     while (*p) {
         /* parse extent line in one of below formats:
          *
@@ -805,23 +807,23 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
          * RW [size in sectors] VMFSSPARSE "file-name.vmdk"
          */
         flat_offset = -1;
-        ret = sscanf(p, "%10s %" SCNd64 " %10s \"%511[^\n\r\"]\" %" SCNd64,
-                access, &sectors, type, fname, &flat_offset);
-        if (ret < 4 || strcmp(access, "RW")) {
+        matches = sscanf(p, "%10s %" SCNd64 " %10s \"%511[^\n\r\"]\" %" SCNd64,
+                         access, &sectors, type, fname, &flat_offset);
+        if (matches < 4 || strcmp(access, "RW")) {
             goto next_line;
         } else if (!strcmp(type, "FLAT")) {
-            if (ret != 5 || flat_offset < 0) {
+            if (matches != 5 || flat_offset < 0) {
                 error_setg(errp, "Invalid extent lines: \n%s", p);
                 return -EINVAL;
             }
         } else if (!strcmp(type, "VMFS")) {
-            if (ret == 4) {
+            if (matches == 4) {
                 flat_offset = 0;
             } else {
                 error_setg(errp, "Invalid extent lines:\n%s", p);
                 return -EINVAL;
             }
-        } else if (ret != 4) {
+        } else if (matches != 4) {
             error_setg(errp, "Invalid extent lines:\n%s", p);
             return -EINVAL;
         }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 06/12] block: vmdk - move string allocations from stack to the heap
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (4 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 05/12] block: vmdk - make ret variable usage clear Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 07/12] block: qapi - move string allocation " Kevin Wolf
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

Functions 'vmdk_parse_extents' and 'vmdk_create' allocate several
PATH_MAX sized arrays on the stack.  Make these dynamically allocated.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/vmdk.c | 39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index dc6459c..7d079ad 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -792,12 +792,11 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
     const char *p = desc;
     int64_t sectors = 0;
     int64_t flat_offset;
-    char extent_path[PATH_MAX];
+    char *extent_path;
     BlockDriverState *extent_file;
     BDRVVmdkState *s = bs->opaque;
     VmdkExtent *extent;
 
-
     while (*p) {
         /* parse extent line in one of below formats:
          *
@@ -843,11 +842,13 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
             return -EINVAL;
         }
 
+        extent_path = g_malloc0(PATH_MAX);
         path_combine(extent_path, sizeof(extent_path),
                 desc_file_path, fname);
         extent_file = NULL;
         ret = bdrv_open(&extent_file, extent_path, NULL, NULL,
                         bs->open_flags | BDRV_O_PROTOCOL, NULL, errp);
+        g_free(extent_path);
         if (ret) {
             return ret;
         }
@@ -1797,10 +1798,15 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
     int ret = 0;
     bool flat, split, compress;
     GString *ext_desc_lines;
-    char path[PATH_MAX], prefix[PATH_MAX], postfix[PATH_MAX];
+    char *path = g_malloc0(PATH_MAX);
+    char *prefix = g_malloc0(PATH_MAX);
+    char *postfix = g_malloc0(PATH_MAX);
+    char *desc_line = g_malloc0(BUF_SIZE);
+    char *ext_filename = g_malloc0(PATH_MAX);
+    char *desc_filename = g_malloc0(PATH_MAX);
     const int64_t split_size = 0x80000000;  /* VMDK has constant split size */
     const char *desc_extent_line;
-    char parent_desc_line[BUF_SIZE] = "";
+    char *parent_desc_line = g_malloc0(BUF_SIZE);
     uint32_t parent_cid = 0xffffffff;
     uint32_t number_heads = 16;
     bool zeroed_grain = false;
@@ -1916,33 +1922,27 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
         }
         parent_cid = vmdk_read_cid(bs, 0);
         bdrv_unref(bs);
-        snprintf(parent_desc_line, sizeof(parent_desc_line),
+        snprintf(parent_desc_line, BUF_SIZE,
                 "parentFileNameHint=\"%s\"", backing_file);
     }
 
     /* Create extents */
     filesize = total_size;
     while (filesize > 0) {
-        char desc_line[BUF_SIZE];
-        char ext_filename[PATH_MAX];
-        char desc_filename[PATH_MAX];
         int64_t size = filesize;
 
         if (split && size > split_size) {
             size = split_size;
         }
         if (split) {
-            snprintf(desc_filename, sizeof(desc_filename), "%s-%c%03d%s",
+            snprintf(desc_filename, PATH_MAX, "%s-%c%03d%s",
                     prefix, flat ? 'f' : 's', ++idx, postfix);
         } else if (flat) {
-            snprintf(desc_filename, sizeof(desc_filename), "%s-flat%s",
-                    prefix, postfix);
+            snprintf(desc_filename, PATH_MAX, "%s-flat%s", prefix, postfix);
         } else {
-            snprintf(desc_filename, sizeof(desc_filename), "%s%s",
-                    prefix, postfix);
+            snprintf(desc_filename, PATH_MAX, "%s%s", prefix, postfix);
         }
-        snprintf(ext_filename, sizeof(ext_filename), "%s%s",
-                path, desc_filename);
+        snprintf(ext_filename, PATH_MAX, "%s%s", path, desc_filename);
 
         if (vmdk_create_extent(ext_filename, size,
                                flat, compress, zeroed_grain, opts, errp)) {
@@ -1952,7 +1952,7 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
         filesize -= size;
 
         /* Format description line */
-        snprintf(desc_line, sizeof(desc_line),
+        snprintf(desc_line, BUF_SIZE,
                     desc_extent_line, size / BDRV_SECTOR_SIZE, desc_filename);
         g_string_append(ext_desc_lines, desc_line);
     }
@@ -2007,6 +2007,13 @@ exit:
     g_free(backing_file);
     g_free(fmt);
     g_free(desc);
+    g_free(path);
+    g_free(prefix);
+    g_free(postfix);
+    g_free(desc_line);
+    g_free(ext_filename);
+    g_free(desc_filename);
+    g_free(parent_desc_line);
     g_string_free(ext_desc_lines, true);
     return ret;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 07/12] block: qapi - move string allocation from stack to the heap
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (5 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 06/12] block: vmdk - move string allocations from stack to the heap Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 08/12] block: remove unused variable in bdrv_commit Kevin Wolf
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

Rather than declaring 'backing_filename2' on the stack in
bdrv_query_image_info(), dynamically allocate it on the heap.

Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/qapi.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index a6fd6f7..dec9f60 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -175,7 +175,6 @@ void bdrv_query_image_info(BlockDriverState *bs,
 {
     int64_t size;
     const char *backing_filename;
-    char backing_filename2[1024];
     BlockDriverInfo bdi;
     int ret;
     Error *err = NULL;
@@ -211,13 +210,14 @@ void bdrv_query_image_info(BlockDriverState *bs,
 
     backing_filename = bs->backing_file;
     if (backing_filename[0] != '\0') {
+        char *backing_filename2 = g_malloc0(1024);
         info->backing_filename = g_strdup(backing_filename);
         info->has_backing_filename = true;
-        bdrv_get_full_backing_filename(bs, backing_filename2,
-                                       sizeof(backing_filename2), &err);
+        bdrv_get_full_backing_filename(bs, backing_filename2, 1024, &err);
         if (err) {
             error_propagate(errp, err);
             qapi_free_ImageInfo(info);
+            g_free(backing_filename2);
             return;
         }
 
@@ -231,6 +231,7 @@ void bdrv_query_image_info(BlockDriverState *bs,
             info->backing_filename_format = g_strdup(bs->backing_format);
             info->has_backing_filename_format = true;
         }
+        g_free(backing_filename2);
     }
 
     ret = bdrv_query_snapshot_info_list(bs, &info->snapshots, &err);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 08/12] block: remove unused variable in bdrv_commit
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (6 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 07/12] block: qapi - move string allocation " Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 09/12] block: mirror - change string allocation to 2-bytes Kevin Wolf
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

As Stefan pointed out, the variable 'filename' in bdrv_commit is unused,
despite being maintained in previous patches.

With this patch, get rid of the variable for good.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block.c b/block.c
index cbe4a32..d45e4dd 100644
--- a/block.c
+++ b/block.c
@@ -2207,7 +2207,6 @@ int bdrv_commit(BlockDriverState *bs)
     int n, ro, open_flags;
     int ret = 0;
     uint8_t *buf = NULL;
-    char filename[PATH_MAX];
 
     if (!drv)
         return -ENOMEDIUM;
@@ -2222,8 +2221,6 @@ int bdrv_commit(BlockDriverState *bs)
     }
 
     ro = bs->backing_hd->read_only;
-    /* Use pstrcpy (not strncpy): filename must be NUL-terminated. */
-    pstrcpy(filename, sizeof(filename), bs->backing_hd->filename);
     open_flags =  bs->backing_hd->open_flags;
 
     if (ro) {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 09/12] block: mirror - change string allocation to 2-bytes
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (7 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 08/12] block: remove unused variable in bdrv_commit Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 10/12] block: update string sizes for filename, backing_file, exact_filename Kevin Wolf
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

The backing_filename string in mirror_run() is only used to check
for a NULL string, so we don't need to allocate 1024 bytes (or, later,
PATH_MAX bytes), when we only need to copy the first 2 characters.

We technically only need 1 byte, as we are just checking for NULL, but
since backing_filename[] is populated by bdrv_get_backing_filename(), a
string size of 1 will always only return '\0';

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/mirror.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/mirror.c b/block/mirror.c
index 9019d1b..4056164 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -378,7 +378,8 @@ static void coroutine_fn mirror_run(void *opaque)
     int64_t sector_num, end, sectors_per_chunk, length;
     uint64_t last_pause_ns;
     BlockDriverInfo bdi;
-    char backing_filename[1024];
+    char backing_filename[2]; /* we only need 2 characters because we are only
+                                 checking for a NULL string */
     int ret = 0;
     int n;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 10/12] block: update string sizes for filename, backing_file, exact_filename
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (8 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 09/12] block: mirror - change string allocation to 2-bytes Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 11/12] block: vhdx - force FileOffsetMB field to '0' for certain block states Kevin Wolf
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

The string field entries 'filename', 'backing_file', and
'exact_filename' in the BlockDriverState struct are defined as 1024
bytes.

However, many places that use these values accept a maximum of PATH_MAX
bytes, so we have a mixture of 1024 byte and PATH_MAX byte allocations.
This patch makes the BlockDriverStruct field string sizes match usage.

This patch also does a few fixes related to the size that needs to
happen now:

    * the block qapi driver is updated to use PATH_MAX bytes
    * the qcow and qcow2 drivers have an additional safety check
    * the block vvfat driver is updated to use PATH_MAX bytes
      for the size of backing_file, for systems where PATH_MAX is < 1024
      bytes.
    * qemu-img uses PATH_MAX rather than 1024.  These instances were not
      changed to be dynamically allocated, however, as the extra
      temporary 3K in stack usage for qemu-img does not seem worrisome.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/qapi.c              | 4 ++--
 block/qcow.c              | 2 +-
 block/qcow2.c             | 3 ++-
 block/vvfat.c             | 4 ++--
 include/block/block_int.h | 8 ++++----
 qemu-img.c                | 4 ++--
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index dec9f60..75c388e 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -210,10 +210,10 @@ void bdrv_query_image_info(BlockDriverState *bs,
 
     backing_filename = bs->backing_file;
     if (backing_filename[0] != '\0') {
-        char *backing_filename2 = g_malloc0(1024);
+        char *backing_filename2 = g_malloc0(PATH_MAX);
         info->backing_filename = g_strdup(backing_filename);
         info->has_backing_filename = true;
-        bdrv_get_full_backing_filename(bs, backing_filename2, 1024, &err);
+        bdrv_get_full_backing_filename(bs, backing_filename2, PATH_MAX, &err);
         if (err) {
             error_propagate(errp, err);
             qapi_free_ImageInfo(info);
diff --git a/block/qcow.c b/block/qcow.c
index ece2269..ccbe9e0 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -215,7 +215,7 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags,
     /* read the backing file name */
     if (header.backing_file_offset != 0) {
         len = header.backing_file_size;
-        if (len > 1023) {
+        if (len > 1023 || len > sizeof(bs->backing_file)) {
             error_setg(errp, "Backing file name too long");
             ret = -EINVAL;
             goto fail;
diff --git a/block/qcow2.c b/block/qcow2.c
index e4e690a..dbaf016 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -868,7 +868,8 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
     /* read the backing file name */
     if (header.backing_file_offset != 0) {
         len = header.backing_file_size;
-        if (len > MIN(1023, s->cluster_size - header.backing_file_offset)) {
+        if (len > MIN(1023, s->cluster_size - header.backing_file_offset) ||
+            len > sizeof(bs->backing_file)) {
             error_setg(errp, "Backing file name too long");
             ret = -EINVAL;
             goto fail;
diff --git a/block/vvfat.c b/block/vvfat.c
index e34a789..a1a44f0 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2909,8 +2909,8 @@ static int enable_write_target(BDRVVVFATState *s, Error **errp)
 
     array_init(&(s->commits), sizeof(commit_t));
 
-    s->qcow_filename = g_malloc(1024);
-    ret = get_tmp_filename(s->qcow_filename, 1024);
+    s->qcow_filename = g_malloc(PATH_MAX);
+    ret = get_tmp_filename(s->qcow_filename, PATH_MAX);
     if (ret < 0) {
         error_setg_errno(errp, -ret, "can't create temporary file");
         goto err;
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 06a21dd..e264be9 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -339,13 +339,13 @@ struct BlockDriverState {
      * regarding this BDS's context */
     QLIST_HEAD(, BdrvAioNotifier) aio_notifiers;
 
-    char filename[1024];
-    char backing_file[1024]; /* if non zero, the image is a diff of
-                                this file image */
+    char filename[PATH_MAX];
+    char backing_file[PATH_MAX]; /* if non zero, the image is a diff of
+                                    this file image */
     char backing_format[16]; /* if non-zero and backing_file exists */
 
     QDict *full_open_options;
-    char exact_filename[1024];
+    char exact_filename[PATH_MAX];
 
     BlockDriverState *backing_hd;
     BlockDriverState *file;
diff --git a/qemu-img.c b/qemu-img.c
index 7876258..4e9a7f5 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2556,7 +2556,7 @@ static int img_rebase(int argc, char **argv)
 
     /* For safe rebasing we need to compare old and new backing file */
     if (!unsafe) {
-        char backing_name[1024];
+        char backing_name[PATH_MAX];
 
         blk_old_backing = blk_new_with_bs("old_backing", &error_abort);
         bs_old_backing = blk_bs(blk_old_backing);
@@ -2614,7 +2614,7 @@ static int img_rebase(int argc, char **argv)
         }
         old_backing_num_sectors = bdrv_nb_sectors(bs_old_backing);
         if (old_backing_num_sectors < 0) {
-            char backing_name[1024];
+            char backing_name[PATH_MAX];
 
             bdrv_get_backing_filename(bs, backing_name, sizeof(backing_name));
             error_report("Could not get size of '%s': %s",
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 11/12] block: vhdx - force FileOffsetMB field to '0' for certain block states
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (9 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 10/12] block: update string sizes for filename, backing_file, exact_filename Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-23 18:20 ` [Qemu-devel] [PULL 12/12] iotests: Lower 064's memory usage Kevin Wolf
  2015-01-26 10:16 ` [Qemu-devel] [PULL 00/12] Block patches Peter Maydell
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Jeff Cody <jcody@redhat.com>

The v1.0.0 spec calls out PAYLOAD_BLOCK_ZERO FileOffsetMB field as being
'reserved'.  In practice, this means that Hyper-V will fail to read a
disk image with PAYLOAD_BLOCK_ZERO block states with a FileOffsetMB
value other than 0.

The other states that indicate a block that is not there
(PAYLOAD_BLOCK_UNDEFINED, PAYLOAD_BLOCK_NOT_PRESENT,
 PAYLOAD_BLOCK_UNMAPPED) have multiple options for what FileOffsetMB may
be set to, and '0' is explicitly called out as an option.

For all the above states, we will also just set the FileOffsetMB value
to 0.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: a9fe92f53f07e6ab1693811e4312c0d1e958500b.1421787566.git.jcody@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/vhdx.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/block/vhdx.c b/block/vhdx.c
index 06f2b1a..bb3ed45 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -1174,7 +1174,18 @@ static void vhdx_update_bat_table_entry(BlockDriverState *bs, BDRVVHDXState *s,
 {
     /* The BAT entry is a uint64, with 44 bits for the file offset in units of
      * 1MB, and 3 bits for the block state. */
-    s->bat[sinfo->bat_idx]  = sinfo->file_offset;
+    if ((state == PAYLOAD_BLOCK_ZERO)        ||
+        (state == PAYLOAD_BLOCK_UNDEFINED)   ||
+        (state == PAYLOAD_BLOCK_NOT_PRESENT) ||
+        (state == PAYLOAD_BLOCK_UNMAPPED)) {
+        s->bat[sinfo->bat_idx]  = 0;  /* For PAYLOAD_BLOCK_ZERO, the
+                                         FileOffsetMB field is denoted as
+                                         'reserved' in the v1.0 spec.  If it is
+                                         non-zero, MS Hyper-V will fail to read
+                                         the disk image */
+    } else {
+        s->bat[sinfo->bat_idx]  = sinfo->file_offset;
+    }
 
     s->bat[sinfo->bat_idx] |= state & VHDX_BAT_STATE_BIT_MASK;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 12/12] iotests: Lower 064's memory usage
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (10 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 11/12] block: vhdx - force FileOffsetMB field to '0' for certain block states Kevin Wolf
@ 2015-01-23 18:20 ` Kevin Wolf
  2015-01-26 10:16 ` [Qemu-devel] [PULL 00/12] Block patches Peter Maydell
  12 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

From: Max Reitz <mreitz@redhat.com>

Test 064 reads a lot of data at once which currently results in qemu-io
having to allocate up to about 1 GB of memory (958 MB, to be exact).
This patch lowers that amount to 128 MB by making the test read smaller
chunks.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-id: 1422025185-25229-1-git-send-email-mreitz@redhat.com
---
 tests/qemu-iotests/064     | 19 +++++++++++++++++--
 tests/qemu-iotests/064.out | 34 ++++++++++++++++++++++++++++++----
 2 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/tests/qemu-iotests/064 b/tests/qemu-iotests/064
index 1c74c31..7564563 100755
--- a/tests/qemu-iotests/064
+++ b/tests/qemu-iotests/064
@@ -54,7 +54,15 @@ $QEMU_IO -r -c "read -pP 0x96 33M 33M" "$TEST_IMG" | _filter_qemu_io
 
 echo
 echo "=== Verify pattern 0x00, 66M - 1024M ==="
-$QEMU_IO -r -c "read -pP 0x00 66M 958M" "$TEST_IMG" | _filter_qemu_io
+$QEMU_IO -r -c "read -pP 0x00 66M 62M" \
+            -c "read -pP 0x00 128M 128M" \
+            -c "read -pP 0x00 256M 128M" \
+            -c "read -pP 0x00 384M 128M" \
+            -c "read -pP 0x00 512M 128M" \
+            -c "read -pP 0x00 640M 128M" \
+            -c "read -pP 0x00 768M 128M" \
+            -c "read -pP 0x00 896M 128M" \
+            "$TEST_IMG" | _filter_qemu_io
 
 echo
 echo "=== Verify pattern write, 0xc3 99M-157M ==="
@@ -63,7 +71,14 @@ $QEMU_IO -c "write -pP 0xc3 99M 58M" "$TEST_IMG" | _filter_qemu_io
 $QEMU_IO -c "read -pP 0xa5 0 33M" "$TEST_IMG" | _filter_qemu_io
 $QEMU_IO -c "read -pP 0x96 33M 33M" "$TEST_IMG" | _filter_qemu_io
 $QEMU_IO -c "read -pP 0x00 66M 33M" "$TEST_IMG" | _filter_qemu_io
-$QEMU_IO -c "read -pP 0x00 157MM 867MM" "$TEST_IMG" | _filter_qemu_io
+$QEMU_IO -c "read -pP 0x00 157M 99M" \
+         -c "read -pP 0x00 256M 128M" \
+         -c "read -pP 0x00 384M 128M" \
+         -c "read -pP 0x00 512M 128M" \
+         -c "read -pP 0x00 640M 128M" \
+         -c "read -pP 0x00 768M 128M" \
+         -c "read -pP 0x00 896M 128M" \
+         "$TEST_IMG" | _filter_qemu_io
 # now verify what we should have actually written
 $QEMU_IO -c "read -pP 0xc3 99M 58M" "$TEST_IMG" | _filter_qemu_io
 
diff --git a/tests/qemu-iotests/064.out b/tests/qemu-iotests/064.out
index 5346a4e..1a5b9e2 100644
--- a/tests/qemu-iotests/064.out
+++ b/tests/qemu-iotests/064.out
@@ -9,8 +9,22 @@ read 34603008/34603008 bytes at offset 34603008
 33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 
 === Verify pattern 0x00, 66M - 1024M ===
-read 1004535808/1004535808 bytes at offset 69206016
-958 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 65011712/65011712 bytes at offset 69206016
+62 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 134217728
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 268435456
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 402653184
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 536870912
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 671088640
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 805306368
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 939524096
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 
 === Verify pattern write, 0xc3 99M-157M ===
 wrote 60817408/60817408 bytes at offset 103809024
@@ -21,8 +35,20 @@ read 34603008/34603008 bytes at offset 34603008
 33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 34603008/34603008 bytes at offset 69206016
 33 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 909115392/909115392 bytes at offset 164626432
-867 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 103809024/103809024 bytes at offset 164626432
+99 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 268435456
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 402653184
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 536870912
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 671088640
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 805306368
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 134217728/134217728 bytes at offset 939524096
+128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 read 60817408/60817408 bytes at offset 103809024
 58 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 *** done
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
                   ` (11 preceding siblings ...)
  2015-01-23 18:20 ` [Qemu-devel] [PULL 12/12] iotests: Lower 064's memory usage Kevin Wolf
@ 2015-01-26 10:16 ` Peter Maydell
  12 siblings, 0 replies; 38+ messages in thread
From: Peter Maydell @ 2015-01-26 10:16 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: QEMU Developers

On 23 January 2015 at 18:20, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit c6441452b50c44fdbb362b239ce623f77cf3cd51:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20150122-1' into staging (2015-01-22 18:57:36 +0000)
>
> are available in the git repository at:
>
>
>   git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to bc63781ca350cad4c9eb142ce8f55bfaded4276e:
>
>   Merge remote-tracking branch 'mreitz/block' into queue-block (2015-01-23 18:51:47 +0100)
>
> ----------------------------------------------------------------
>
> Block patches for 2.3
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2019-08-27 20:16 Stefan Hajnoczi
@ 2019-09-03 10:05 ` Peter Maydell
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Maydell @ 2019-09-03 10:05 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Fam Zheng, Kevin Wolf, Qemu-block, QEMU Developers, Max Reitz, John Snow

On Tue, 27 Aug 2019 at 21:16, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit dac03af5d5482ec7ee9c23db467bb7230b33c0d9:
>
>   Merge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging (2019-08-27 10:00:51 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 5396234b96a2ac743f48644529771498e036e698:
>
>   block/qcow2: implement .bdrv_co_pwritev(_compressed)_part (2019-08-27 14:58:42 +0100)
>
> ----------------------------------------------------------------
> Pull request


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2019-08-27 20:16 Stefan Hajnoczi
  2019-09-03 10:05 ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Stefan Hajnoczi @ 2019-08-27 20:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Kevin Wolf, qemu-block, Peter Maydell, Max Reitz,
	Stefan Hajnoczi, John Snow

The following changes since commit dac03af5d5482ec7ee9c23db467bb7230b33c0d9:

  Merge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging (2019-08-27 10:00:51 +0100)

are available in the Git repository at:

  https://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 5396234b96a2ac743f48644529771498e036e698:

  block/qcow2: implement .bdrv_co_pwritev(_compressed)_part (2019-08-27 14:58:42 +0100)

----------------------------------------------------------------
Pull request

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

Vladimir Sementsov-Ogievskiy (12):
  util/iov: introduce qemu_iovec_init_extended
  util/iov: improve qemu_iovec_is_zero
  block/io: refactor padding
  block: define .*_part io handlers in BlockDriver
  block/io: bdrv_co_do_copy_on_readv: use and support qiov_offset
  block/io: bdrv_co_do_copy_on_readv: lazy allocation
  block/io: bdrv_aligned_preadv: use and support qiov_offset
  block/io: bdrv_aligned_pwritev: use and support qiov_offset
  block/io: introduce bdrv_co_p{read, write}v_part
  block/qcow2: refactor qcow2_co_preadv to use buffer-based io
  block/qcow2: implement .bdrv_co_preadv_part
  block/qcow2: implement .bdrv_co_pwritev(_compressed)_part

 block/qcow2.h             |   1 +
 include/block/block_int.h |  21 ++
 include/qemu/iov.h        |  10 +-
 block/backup.c            |   2 +-
 block/io.c                | 541 +++++++++++++++++++++++---------------
 block/qcow2-cluster.c     |  14 +-
 block/qcow2.c             | 131 +++++----
 qemu-img.c                |   4 +-
 util/iov.c                | 153 +++++++++--
 9 files changed, 568 insertions(+), 309 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2017-05-26 19:23 Jeff Cody
  0 siblings, 0 replies; 38+ messages in thread
From: Jeff Cody @ 2017-05-26 19:23 UTC (permalink / raw)
  To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel, stefanha

The following changes since commit 9964e96dc9999cf7f7c936ee854a795415d19b60:

  Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100)

are available in the git repository at:

  git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to 223a23c198787328ae75bc65d84edf5fde33c0b6:

  block/gluster: glfs_lseek() workaround (2017-05-24 16:44:46 -0400)

----------------------------------------------------------------
Block patches
----------------------------------------------------------------

Jeff Cody (1):
  block/gluster: glfs_lseek() workaround

Paolo Bonzini (11):
  blockjob: remove unnecessary check
  blockjob: remove iostatus_reset callback
  blockjob: introduce block_job_early_fail
  blockjob: introduce block_job_pause/resume_all
  blockjob: separate monitor and blockjob APIs
  blockjob: move iostatus reset inside block_job_user_resume
  blockjob: introduce block_job_cancel_async, check iostatus invariants
  blockjob: group BlockJob transaction functions together
  blockjob: strengthen a bit test-blockjob-txn
  blockjob: reorganize block_job_completed_txn_abort
  blockjob: use deferred_to_main_loop to indicate the coroutine has
    ended

 block/backup.c               |   2 +-
 block/commit.c               |   2 +-
 block/gluster.c              |  18 +-
 block/io.c                   |  19 +-
 block/mirror.c               |   2 +-
 blockdev.c                   |   1 -
 blockjob.c                   | 750 ++++++++++++++++++++++++-------------------
 include/block/blockjob.h     |  16 -
 include/block/blockjob_int.h |  27 +-
 tests/test-blockjob-txn.c    |   7 +-
 tests/test-blockjob.c        |  10 +-
 11 files changed, 463 insertions(+), 391 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2017-04-21 13:46 Jeff Cody
@ 2017-04-21 16:55 ` Peter Maydell
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Maydell @ 2017-04-21 16:55 UTC (permalink / raw)
  To: Jeff Cody; +Cc: Qemu-block, QEMU Developers

On 21 April 2017 at 14:46, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit bfec359afba088aaacc7d316f43302f28c6e642a:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qdev-2017-04-21' into staging (2017-04-21 11:42:03 +0100)
>
> are available in the git repository at:
>
>   git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to 1507631e438930bc07f776f303af127a9cdb4d41:
>
>   qemu-iotests: _cleanup_qemu must be called on exit (2017-04-21 08:32:44 -0400)
>
> ----------------------------------------------------------------
>
> Block patches for 2.10
>

Hi, I'm afraid this runs into format string compile issues:

In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1465:42:
error: format specifies type 'unsigned long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
                          , guid, iodir, size, off, acb, ret, err);
                                         ^~~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
            qemu_log(FMT, ## __VA_ARGS__);              \
                             ^
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1465:48:
error: format specifies type 'unsigned long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
                          , guid, iodir, size, off, acb, ret, err);
                                               ^~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
            qemu_log(FMT, ## __VA_ARGS__);              \
                             ^
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1493:41:
error: format specifies type 'unsigned long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
                          , vdisk_guid, vdisk_size);
                                        ^~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
            qemu_log(FMT, ## __VA_ARGS__);              \
                             ^
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1507:34:
error: format specifies type 'long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
                          , acb, ret);
                                 ^~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
            qemu_log(FMT, ## __VA_ARGS__);              \
                             ^
4 errors generated.


Those are the OSX errors, but the compile also fails for 32-bit
hosts (including w32).

thanks
-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2017-04-21 13:46 Jeff Cody
  2017-04-21 16:55 ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Jeff Cody @ 2017-04-21 13:46 UTC (permalink / raw)
  To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel

The following changes since commit bfec359afba088aaacc7d316f43302f28c6e642a:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qdev-2017-04-21' into staging (2017-04-21 11:42:03 +0100)

are available in the git repository at:

  git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to 1507631e438930bc07f776f303af127a9cdb4d41:

  qemu-iotests: _cleanup_qemu must be called on exit (2017-04-21 08:32:44 -0400)

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

Block patches for 2.10

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

Ashish Mittal (2):
  block/vxhs.c: Add support for a new block device type called "vxhs"
  block/vxhs.c: Add qemu-iotests for new block device type "vxhs"

Jeff Cody (10):
  qemu-iotests: exclude vxhs from image creation via protocol
  block: add bdrv_set_read_only() helper function
  block: do not set BDS read_only if copy_on_read enabled
  block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only
  block: code movement
  block: introduce bdrv_can_set_read_only()
  block: use bdrv_can_set_read_only() during reopen
  block/rbd - update variable names to more apt names
  block/rbd: Add support for reopen()
  qemu-iotests: _cleanup_qemu must be called on exit

 block.c                          |  56 +++-
 block/Makefile.objs              |   2 +
 block/bochs.c                    |   5 +-
 block/cloop.c                    |   5 +-
 block/dmg.c                      |   6 +-
 block/rbd.c                      |  65 +++--
 block/trace-events               |  17 ++
 block/vvfat.c                    |  19 +-
 block/vxhs.c                     | 575 +++++++++++++++++++++++++++++++++++++++
 configure                        |  39 +++
 include/block/block.h            |   2 +
 qapi/block-core.json             |  23 +-
 tests/qemu-iotests/017           |   1 +
 tests/qemu-iotests/020           |   1 +
 tests/qemu-iotests/028           |   1 +
 tests/qemu-iotests/029           |   1 +
 tests/qemu-iotests/073           |   1 +
 tests/qemu-iotests/094           |  11 +-
 tests/qemu-iotests/102           |   5 +-
 tests/qemu-iotests/109           |   1 +
 tests/qemu-iotests/114           |   1 +
 tests/qemu-iotests/117           |   1 +
 tests/qemu-iotests/130           |   2 +
 tests/qemu-iotests/134           |   1 +
 tests/qemu-iotests/140           |   1 +
 tests/qemu-iotests/141           |   1 +
 tests/qemu-iotests/143           |   1 +
 tests/qemu-iotests/156           |   2 +
 tests/qemu-iotests/158           |   1 +
 tests/qemu-iotests/common        |   6 +
 tests/qemu-iotests/common.config |  13 +
 tests/qemu-iotests/common.filter |   1 +
 tests/qemu-iotests/common.rc     |  19 ++
 33 files changed, 844 insertions(+), 42 deletions(-)
 create mode 100644 block/vxhs.c

-- 
2.9.3

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2016-06-07 14:26 Stefan Hajnoczi
@ 2016-06-07 15:34 ` Peter Maydell
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Maydell @ 2016-06-07 15:34 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 7 June 2016 at 15:26, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 76462405809d29bab65a3699686998ba124ab942:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160606-1' into staging (2016-06-06 17:02:42 +0100)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 8860eabdee32f78d9a34273a340b8f74476bc9a0:
>
>   throttle: refuse iops-size without iops-total/read/write (2016-06-07 14:40:51 +0100)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2016-06-07 14:26 Stefan Hajnoczi
  2016-06-07 15:34 ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Stefan Hajnoczi @ 2016-06-07 14:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit 76462405809d29bab65a3699686998ba124ab942:

  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160606-1' into staging (2016-06-06 17:02:42 +0100)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 8860eabdee32f78d9a34273a340b8f74476bc9a0:

  throttle: refuse iops-size without iops-total/read/write (2016-06-07 14:40:51 +0100)

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

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

Changlong Xie (1):
  iostatus: fix comments for block_job_iostatus_reset

Eric Blake (1):
  block: Move BlockRequest type to io.c

Fam Zheng (5):
  blockdev-backup: Use bdrv_lookup_bs on target
  blockdev-backup: Don't move target AioContext if it's attached
  virtio-blk: Remove op blocker for dataplane
  virtio-scsi: Remove op blocker for dataplane
  block: Drop bdrv_ioctl_bh_cb

Kevin Wolf (1):
  block/io: Remove unused bdrv_aio_write_zeroes()

Peter Lieven (1):
  block/io: optimize bdrv_co_pwritev for small requests

Stefan Hajnoczi (3):
  tests: avoid coroutine pool test crash
  virtio: drop duplicate virtio_queue_get_id() function
  throttle: refuse iops-size without iops-total/read/write

 block/io.c                      | 60 +++++++++++++++++++-------------------
 blockdev.c                      | 23 ++++++++-------
 hw/block/dataplane/virtio-blk.c | 63 ----------------------------------------
 hw/scsi/virtio-scsi.c           | 64 +----------------------------------------
 hw/virtio/virtio.c              |  7 -----
 include/block/block.h           | 24 ----------------
 include/block/blockjob.h        |  2 +-
 include/hw/virtio/virtio-scsi.h | 11 -------
 include/hw/virtio/virtio.h      |  1 -
 tests/qemu-iotests/077          | 12 +-------
 tests/qemu-iotests/077.out      | 26 -----------------
 tests/test-coroutine.c          | 10 ++++++-
 tests/test-throttle.c           | 10 +++++++
 trace-events                    |  1 -
 util/throttle.c                 |  8 ++++++
 15 files changed, 74 insertions(+), 248 deletions(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2016-02-29 20:08 Jeff Cody
@ 2016-03-01 10:34 ` Peter Maydell
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Maydell @ 2016-03-01 10:34 UTC (permalink / raw)
  To: Jeff Cody; +Cc: Fam Zheng, QEMU Developers, Qemu-block

On 29 February 2016 at 20:08, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit 071608b519adf62bc29c914343a21c5407ab1ac9:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160229-1' into staging (2016-02-29 12:24:26 +0000)
>
> are available in the git repository at:
>
>
>   git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to cc199b16cf4cb9279aca73f5f5dce2cc337b9079:
>
>   iotests/124: Add cluster_size mismatch test (2016-02-29 14:55:14 -0500)
>
> ----------------------------------------------------------------
> Block patches
> ----------------------------------------------------------------
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2016-02-29 20:08 Jeff Cody
  2016-03-01 10:34 ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Jeff Cody @ 2016-02-29 20:08 UTC (permalink / raw)
  To: qemu-block; +Cc: peter.maydell, jcody, famz, qemu-devel

The following changes since commit 071608b519adf62bc29c914343a21c5407ab1ac9:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160229-1' into staging (2016-02-29 12:24:26 +0000)

are available in the git repository at:


  git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to cc199b16cf4cb9279aca73f5f5dce2cc337b9079:

  iotests/124: Add cluster_size mismatch test (2016-02-29 14:55:14 -0500)

----------------------------------------------------------------
Block patches
----------------------------------------------------------------

Daniel P. Berrange (3):
  rbd: add support for getting password from QCryptoSecret object
  curl: add support for HTTP authentication parameters
  iscsi: add support for getting CHAP password via QCryptoSecret API

Fam Zheng (2):
  mirror: Rewrite mirror_iteration
  mirror: Add mirror_wait_for_io

John Snow (3):
  block/backup: make backup cluster size configurable
  block/backup: avoid copying less than full target clusters
  iotests/124: Add cluster_size mismatch test

Max Reitz (2):
  vhdx: DIV_ROUND_UP() in vhdx_calc_bat_entries()
  vhdx: Simplify vhdx_set_shift_bits()

Peter Lieven (1):
  block/nfs: add support for setting debug level

Vasiliy Tolstov (1):
  sheepdog: allow to delete snapshot

 block/backup.c             |  87 +++++++----
 block/curl.c               |  66 +++++++++
 block/iscsi.c              |  24 ++-
 block/mirror.c             | 353 +++++++++++++++++++++++++++------------------
 block/nfs.c                |  12 ++
 block/rbd.c                |  47 ++++++
 block/sheepdog.c           | 125 +++++++++++++++-
 block/vhdx.c               |  18 +--
 tests/qemu-iotests/109.out |  80 +++++-----
 tests/qemu-iotests/124     |  58 +++++++-
 tests/qemu-iotests/124.out |   4 +-
 trace-events               |   1 -
 12 files changed, 641 insertions(+), 234 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2015-10-30 17:37     ` Peter Maydell
@ 2015-10-30 21:59       ` Peter Maydell
  0 siblings, 0 replies; 38+ messages in thread
From: Peter Maydell @ 2015-10-30 21:59 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: QEMU Developers, Stefan Hajnoczi

On 30 October 2015 at 17:37, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 30 October 2015 at 14:19, Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>> I get an error on 64-bit ARM running the ivshmem tests:
>>>
>>> TEST: tests/ivshmem-test... (pid=22948)
>>>   /i386/ivshmem/single:                                                OK
>>>   /i386/ivshmem/pair:                                                  OK
>>>   /i386/ivshmem/server:                                                **
>>> ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
>>> assertion failed (ret != 0): (0 != 0)
>>> FAIL
>>> GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
>>> (pid=23709)
>>>   /i386/ivshmem/hotplug:                                               OK
>>>   /i386/ivshmem/memdev:                                                OK
>>> FAIL: tests/ivshmem-test
>>>
>>> Nothing obviously related in this patchset that would cause that,
>>> though...
>>
>> I've seen this, too, but throwing away my build tree made it go away, so
>> I blamed "make choking on stale build tree" syndrome.  Perhaps it's an
>> intermittent ivshmem bug instead.
>
> I didn't do a make clean before successfully applying other pulls,
> so I think my money is on "intermittent ivshmem issue". I'll have
> another go with this one once I've finished the rest of the queue...

Second try did indeed work fine, so I've applied it.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2015-10-30 14:19   ` Markus Armbruster
@ 2015-10-30 17:37     ` Peter Maydell
  2015-10-30 21:59       ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Peter Maydell @ 2015-10-30 17:37 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: QEMU Developers, Stefan Hajnoczi

On 30 October 2015 at 14:19, Markus Armbruster <armbru@redhat.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>> I get an error on 64-bit ARM running the ivshmem tests:
>>
>> TEST: tests/ivshmem-test... (pid=22948)
>>   /i386/ivshmem/single:                                                OK
>>   /i386/ivshmem/pair:                                                  OK
>>   /i386/ivshmem/server:                                                **
>> ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
>> assertion failed (ret != 0): (0 != 0)
>> FAIL
>> GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
>> (pid=23709)
>>   /i386/ivshmem/hotplug:                                               OK
>>   /i386/ivshmem/memdev:                                                OK
>> FAIL: tests/ivshmem-test
>>
>> Nothing obviously related in this patchset that would cause that,
>> though...
>
> I've seen this, too, but throwing away my build tree made it go away, so
> I blamed "make choking on stale build tree" syndrome.  Perhaps it's an
> intermittent ivshmem bug instead.

I didn't do a make clean before successfully applying other pulls,
so I think my money is on "intermittent ivshmem issue". I'll have
another go with this one once I've finished the rest of the queue...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2015-10-30  9:40 ` Peter Maydell
@ 2015-10-30 14:19   ` Markus Armbruster
  2015-10-30 17:37     ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Markus Armbruster @ 2015-10-30 14:19 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Stefan Hajnoczi

Peter Maydell <peter.maydell@linaro.org> writes:

> On 29 October 2015 at 18:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>> The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce:
>>
>>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into
>> staging (2015-10-29 09:49:52 +0000)
>>
>> are available in the git repository at:
>>
>>   git://github.com/stefanha/qemu.git tags/block-pull-request
>>
>> for you to fetch changes up to 37a639a7fbc5c6b065c80e7e2de78d22af735496:
>>
>>   block: Consider all child nodes in bdrv_requests_pending()
>> (2015-10-29 17:59:27 +0000)
>>
>> ----------------------------------------------------------------
>>
>> ----------------------------------------------------------------
>
> I get an error on 64-bit ARM running the ivshmem tests:
>
> TEST: tests/ivshmem-test... (pid=22948)
>   /i386/ivshmem/single:                                                OK
>   /i386/ivshmem/pair:                                                  OK
>   /i386/ivshmem/server:                                                **
> ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
> assertion failed (ret != 0): (0 != 0)
> FAIL
> GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
> (pid=23709)
>   /i386/ivshmem/hotplug:                                               OK
>   /i386/ivshmem/memdev:                                                OK
> FAIL: tests/ivshmem-test
>
> Nothing obviously related in this patchset that would cause that,
> though...

I've seen this, too, but throwing away my build tree made it go away, so
I blamed "make choking on stale build tree" syndrome.  Perhaps it's an
intermittent ivshmem bug instead.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2015-10-29 18:09 Stefan Hajnoczi
@ 2015-10-30  9:40 ` Peter Maydell
  2015-10-30 14:19   ` Markus Armbruster
  0 siblings, 1 reply; 38+ messages in thread
From: Peter Maydell @ 2015-10-30  9:40 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 29 October 2015 at 18:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce:
>
>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-29 09:49:52 +0000)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 37a639a7fbc5c6b065c80e7e2de78d22af735496:
>
>   block: Consider all child nodes in bdrv_requests_pending() (2015-10-29 17:59:27 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

I get an error on 64-bit ARM running the ivshmem tests:

TEST: tests/ivshmem-test... (pid=22948)
  /i386/ivshmem/single:                                                OK
  /i386/ivshmem/pair:                                                  OK
  /i386/ivshmem/server:                                                **
ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
assertion failed (ret != 0): (0 != 0)
FAIL
GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
(pid=23709)
  /i386/ivshmem/hotplug:                                               OK
  /i386/ivshmem/memdev:                                                OK
FAIL: tests/ivshmem-test

Nothing obviously related in this patchset that would cause that,
though...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2015-10-29 18:09 Stefan Hajnoczi
  2015-10-30  9:40 ` Peter Maydell
  0 siblings, 1 reply; 38+ messages in thread
From: Stefan Hajnoczi @ 2015-10-29 18:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce:

  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-29 09:49:52 +0000)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 37a639a7fbc5c6b065c80e7e2de78d22af735496:

  block: Consider all child nodes in bdrv_requests_pending() (2015-10-29 17:59:27 +0000)

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

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

Cornelia Huck (3):
  s390x: include HW_COMPAT_* props
  ppc/spapr: add 2.4 compat props
  virtio-blk: switch off scsi-passthrough by default

Dr. David Alan Gilbert (1):
  gdb command: qemu handlers

Kevin Wolf (1):
  block: Consider all child nodes in bdrv_requests_pending()

Paolo Bonzini (3):
  qemu-gdb: allow using glibc_pointer_guard() on core dumps
  qemu-gdb: extract parts of "qemu coroutine" implementation
  qemu-gdb: add $qemu_coroutine_sp and $qemu_coroutine_pc

Pavel Butsykin (1):
  virtio: sync the dataplane vring state to the virtqueue before
    virtio_save

Sai Pavan Boddu (3):
  sd.h: Move sd.h to include/hw/sd/
  sdhci: Split sdhci.h for public and internal device usage
  target-arm: xlnx-zynqmp: Add sdhci support.

 block/io.c                   |  13 +-
 hw/arm/xlnx-zynqmp.c         |  28 ++++
 hw/block/virtio-blk.c        |   7 +-
 hw/ppc/spapr.c               |   9 ++
 hw/s390x/s390-virtio-ccw.c   |   2 +
 hw/scsi/virtio-scsi.c        |   5 +
 hw/sd/milkymist-memcard.c    |   2 +-
 hw/sd/omap_mmc.c             |   2 +-
 hw/sd/pl181.c                |   2 +-
 hw/sd/pxa2xx_mmci.c          |   2 +-
 hw/sd/sd.c                   |   2 +-
 hw/sd/sdhci-internal.h       | 232 +++++++++++++++++++++++++++++++++
 hw/sd/sdhci.c                |   3 +-
 hw/sd/sdhci.h                | 297 -------------------------------------------
 hw/sd/ssi-sd.c               |   2 +-
 include/hw/arm/xlnx-zynqmp.h |   3 +
 include/hw/compat.h          |   6 +-
 include/hw/sd.h              |  80 ------------
 include/hw/sd/sd.h           |  80 ++++++++++++
 include/hw/sd/sdhci.h        |  94 ++++++++++++++
 scripts/qemu-gdb.py          |   6 +-
 scripts/qemugdb/aio.py       |  58 +++++++++
 scripts/qemugdb/coroutine.py |  90 ++++++++-----
 23 files changed, 601 insertions(+), 424 deletions(-)
 create mode 100644 hw/sd/sdhci-internal.h
 delete mode 100644 hw/sd/sdhci.h
 delete mode 100644 include/hw/sd.h
 create mode 100644 include/hw/sd/sd.h
 create mode 100644 include/hw/sd/sdhci.h
 create mode 100644 scripts/qemugdb/aio.py

-- 
2.4.3

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2012-08-06 20:44 Kevin Wolf
  2012-08-07  8:28 ` Paolo Bonzini
@ 2012-08-07 15:36 ` Anthony Liguori
  1 sibling, 0 replies; 38+ messages in thread
From: Anthony Liguori @ 2012-08-07 15:36 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

Kevin Wolf <kwolf@redhat.com> writes:

> The following changes since commit 26b9b5fe17cc1b6be2e8bf8b9d16094f420bb8ad:
>
>   virtio: fix vhost handling (2012-08-06 14:01:44 -0500)
>
> are available in the git repository at:
>   http://repo.or.cz/r/qemu/kevin.git for-anthony

Pulled. Thanks.

Regards,

Anthony Liguori

>
> Dong Xu Wang (1):
>       qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function
>
> Kevin Wolf (1):
>       qemu-iotests: Be more flexible with image creation options
>
> Markus Armbruster (1):
>       ide scsi: Mess with geometry only for hard disk devices
>
> Paolo Bonzini (1):
>       qapi: generalize documentation of streaming commands
>
> Stefan Hajnoczi (8):
>       qemu-iotests: add qed.py image manipulation utility
>       docs: add dirty bit to qcow2 specification
>       qcow2: introduce dirty bit
>       docs: add lazy refcounts bit to qcow2 specification
>       qemu-iotests: ignore qemu-img create lazy_refcounts output
>       qcow2: implement lazy refcounts
>       qemu-io: add "abort" command to simulate program crash
>       qemu-iotests: add 039 qcow2 lazy refcounts test
>
>  block/qcow2-cluster.c        |    5 +-
>  block/qcow2.c                |  123 +++++++++++++++++++++--
>  block/qcow2.h                |   21 ++++
>  block_int.h                  |   26 +++--
>  docs/specs/qcow2.txt         |   14 ++-
>  hmp-commands.hx              |    2 +-
>  hw/ide/qdev.c                |    3 +-
>  hw/scsi-disk.c               |    3 +-
>  qapi-schema.json             |   17 ++--
>  qemu-img.c                   |   28 +++--
>  qemu-io.c                    |   12 ++
>  tests/qemu-iotests/031.out   |   20 ++--
>  tests/qemu-iotests/036.out   |    4 +-
>  tests/qemu-iotests/039       |  136 ++++++++++++++++++++++++
>  tests/qemu-iotests/039.out   |   53 ++++++++++
>  tests/qemu-iotests/common.rc |    7 +-
>  tests/qemu-iotests/group     |    1 +
>  tests/qemu-iotests/qed.py    |  235 ++++++++++++++++++++++++++++++++++++++++++
>  18 files changed, 650 insertions(+), 60 deletions(-)
>  create mode 100755 tests/qemu-iotests/039
>  create mode 100644 tests/qemu-iotests/039.out
>  create mode 100755 tests/qemu-iotests/qed.py

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2012-08-06 20:44 Kevin Wolf
@ 2012-08-07  8:28 ` Paolo Bonzini
  2012-08-07 15:36 ` Anthony Liguori
  1 sibling, 0 replies; 38+ messages in thread
From: Paolo Bonzini @ 2012-08-07  8:28 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, anthony

Il 06/08/2012 22:44, Kevin Wolf ha scritto:
> The following changes since commit 26b9b5fe17cc1b6be2e8bf8b9d16094f420bb8ad:
> 
>   virtio: fix vhost handling (2012-08-06 14:01:44 -0500)

I see the virtio caching patches are not included, should I resubmit
them together with the change of the default from writethrough to writeback?

Paolo

> are available in the git repository at:
>   http://repo.or.cz/r/qemu/kevin.git for-anthony
> 
> Dong Xu Wang (1):
>       qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function
> 
> Kevin Wolf (1):
>       qemu-iotests: Be more flexible with image creation options
> 
> Markus Armbruster (1):
>       ide scsi: Mess with geometry only for hard disk devices
> 
> Paolo Bonzini (1):
>       qapi: generalize documentation of streaming commands
> 
> Stefan Hajnoczi (8):
>       qemu-iotests: add qed.py image manipulation utility
>       docs: add dirty bit to qcow2 specification
>       qcow2: introduce dirty bit
>       docs: add lazy refcounts bit to qcow2 specification
>       qemu-iotests: ignore qemu-img create lazy_refcounts output
>       qcow2: implement lazy refcounts
>       qemu-io: add "abort" command to simulate program crash
>       qemu-iotests: add 039 qcow2 lazy refcounts test
> 
>  block/qcow2-cluster.c        |    5 +-
>  block/qcow2.c                |  123 +++++++++++++++++++++--
>  block/qcow2.h                |   21 ++++
>  block_int.h                  |   26 +++--
>  docs/specs/qcow2.txt         |   14 ++-
>  hmp-commands.hx              |    2 +-
>  hw/ide/qdev.c                |    3 +-
>  hw/scsi-disk.c               |    3 +-
>  qapi-schema.json             |   17 ++--
>  qemu-img.c                   |   28 +++--
>  qemu-io.c                    |   12 ++
>  tests/qemu-iotests/031.out   |   20 ++--
>  tests/qemu-iotests/036.out   |    4 +-
>  tests/qemu-iotests/039       |  136 ++++++++++++++++++++++++
>  tests/qemu-iotests/039.out   |   53 ++++++++++
>  tests/qemu-iotests/common.rc |    7 +-
>  tests/qemu-iotests/group     |    1 +
>  tests/qemu-iotests/qed.py    |  235 ++++++++++++++++++++++++++++++++++++++++++
>  18 files changed, 650 insertions(+), 60 deletions(-)
>  create mode 100755 tests/qemu-iotests/039
>  create mode 100644 tests/qemu-iotests/039.out
>  create mode 100755 tests/qemu-iotests/qed.py
> 
> 

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2012-08-06 20:44 Kevin Wolf
  2012-08-07  8:28 ` Paolo Bonzini
  2012-08-07 15:36 ` Anthony Liguori
  0 siblings, 2 replies; 38+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

The following changes since commit 26b9b5fe17cc1b6be2e8bf8b9d16094f420bb8ad:

  virtio: fix vhost handling (2012-08-06 14:01:44 -0500)

are available in the git repository at:
  http://repo.or.cz/r/qemu/kevin.git for-anthony

Dong Xu Wang (1):
      qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function

Kevin Wolf (1):
      qemu-iotests: Be more flexible with image creation options

Markus Armbruster (1):
      ide scsi: Mess with geometry only for hard disk devices

Paolo Bonzini (1):
      qapi: generalize documentation of streaming commands

Stefan Hajnoczi (8):
      qemu-iotests: add qed.py image manipulation utility
      docs: add dirty bit to qcow2 specification
      qcow2: introduce dirty bit
      docs: add lazy refcounts bit to qcow2 specification
      qemu-iotests: ignore qemu-img create lazy_refcounts output
      qcow2: implement lazy refcounts
      qemu-io: add "abort" command to simulate program crash
      qemu-iotests: add 039 qcow2 lazy refcounts test

 block/qcow2-cluster.c        |    5 +-
 block/qcow2.c                |  123 +++++++++++++++++++++--
 block/qcow2.h                |   21 ++++
 block_int.h                  |   26 +++--
 docs/specs/qcow2.txt         |   14 ++-
 hmp-commands.hx              |    2 +-
 hw/ide/qdev.c                |    3 +-
 hw/scsi-disk.c               |    3 +-
 qapi-schema.json             |   17 ++--
 qemu-img.c                   |   28 +++--
 qemu-io.c                    |   12 ++
 tests/qemu-iotests/031.out   |   20 ++--
 tests/qemu-iotests/036.out   |    4 +-
 tests/qemu-iotests/039       |  136 ++++++++++++++++++++++++
 tests/qemu-iotests/039.out   |   53 ++++++++++
 tests/qemu-iotests/common.rc |    7 +-
 tests/qemu-iotests/group     |    1 +
 tests/qemu-iotests/qed.py    |  235 ++++++++++++++++++++++++++++++++++++++++++
 18 files changed, 650 insertions(+), 60 deletions(-)
 create mode 100755 tests/qemu-iotests/039
 create mode 100644 tests/qemu-iotests/039.out
 create mode 100755 tests/qemu-iotests/qed.py

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2012-06-08 14:07     ` Anthony Liguori
@ 2012-06-08 14:57       ` Kevin Wolf
  0 siblings, 0 replies; 38+ messages in thread
From: Kevin Wolf @ 2012-06-08 14:57 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Am 08.06.2012 16:07, schrieb Anthony Liguori:
> On 06/08/2012 05:48 PM, Kevin Wolf wrote:
>> Am 07.06.2012 03:17, schrieb Anthony Liguori:
>>> On 06/04/2012 07:13 PM, Kevin Wolf wrote:
>>>> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>>>>
>>>>     target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>>>>
>>>> are available in the git repository at:
>>>>     git://repo.or.cz/qemu/kevin.git for-anthony
>>>
>>> Pulled.  Thanks.
>>
>> But not pushed?
> 
> I'm having a really hard time connecting to repo.or.cz here.  Looks like I 
> mistook a timeout for success and mistakenly merged nothing.
> 
> I'm still having trouble getting to repo.or.cz.  I'll be back in the States 
> Saturday evening so will process this pull Sunday or Monday.

Hm, when repo.or.cz started behaving bad, I started to use things like
'while ! git fetch repo.or.cz; do sleep 1; done' (it would always
succeed after a few attempts), but recently it never needed more than
one attempt.

> Do you want to update the branch in the interim to fix the build issue?

Sure, updated it now.

Kevin

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2012-06-08  9:48   ` Kevin Wolf
@ 2012-06-08 14:07     ` Anthony Liguori
  2012-06-08 14:57       ` Kevin Wolf
  0 siblings, 1 reply; 38+ messages in thread
From: Anthony Liguori @ 2012-06-08 14:07 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On 06/08/2012 05:48 PM, Kevin Wolf wrote:
> Am 07.06.2012 03:17, schrieb Anthony Liguori:
>> On 06/04/2012 07:13 PM, Kevin Wolf wrote:
>>> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>>>
>>>     target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>>>
>>> are available in the git repository at:
>>>     git://repo.or.cz/qemu/kevin.git for-anthony
>>
>> Pulled.  Thanks.
>
> But not pushed?

I'm having a really hard time connecting to repo.or.cz here.  Looks like I 
mistook a timeout for success and mistakenly merged nothing.

I'm still having trouble getting to repo.or.cz.  I'll be back in the States 
Saturday evening so will process this pull Sunday or Monday.

Do you want to update the branch in the interim to fix the build issue?

Regards,

Anthony Liguori

>
> Kevin

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2012-06-07  1:17 ` Anthony Liguori
@ 2012-06-08  9:48   ` Kevin Wolf
  2012-06-08 14:07     ` Anthony Liguori
  0 siblings, 1 reply; 38+ messages in thread
From: Kevin Wolf @ 2012-06-08  9:48 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Am 07.06.2012 03:17, schrieb Anthony Liguori:
> On 06/04/2012 07:13 PM, Kevin Wolf wrote:
>> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>>
>>    target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>>
>> are available in the git repository at:
>>    git://repo.or.cz/qemu/kevin.git for-anthony
> 
> Pulled.  Thanks.

But not pushed?

Kevin

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2012-06-04 11:13 Kevin Wolf
@ 2012-06-07  1:17 ` Anthony Liguori
  2012-06-08  9:48   ` Kevin Wolf
  0 siblings, 1 reply; 38+ messages in thread
From: Anthony Liguori @ 2012-06-07  1:17 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On 06/04/2012 07:13 PM, Kevin Wolf wrote:
> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>
>    target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>
> are available in the git repository at:
>    git://repo.or.cz/qemu/kevin.git for-anthony

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> Josh Durgin (1):
>        rbd: hook up cache options
>
> Kevin Wolf (3):
>        qemu-img check -r for repairing images
>        qemu-img check: Print fixed clusters and recheck
>        qcow2: Support for fixing refcount inconsistencies
>
> MORITA Kazutaka (1):
>        sheepdog: add coroutine_fn markers to coroutine functions
>
> Markus Armbruster (1):
>        Un-inline fdctrl_init_isa()
>
> Paolo Bonzini (4):
>        block: implement is_allocated for raw
>        stream: tweak usage of bdrv_co_is_allocated
>        stream: move is_allocated_above to block.c
>        stream: move rate limiting to a separate header file
>
> Zhi Yong Wu (2):
>        qcow2: remove a line of unnecessary code
>        qcow2: fix the byte endian convertion
>
>   block.c                  |   53 +++++++++++++++++++++-
>   block.h                  |   13 +++++-
>   block/qcow2-cluster.c    |    1 -
>   block/qcow2-refcount.c   |   33 ++++++++++++--
>   block/qcow2.c            |    5 +-
>   block/qcow2.h            |    3 +-
>   block/qed-check.c        |    2 +
>   block/qed.c              |    5 +-
>   block/raw-posix.c        |   98 +++++++++++++++++++++++++++++++++++++++++
>   block/raw.c              |    8 +++
>   block/rbd.c              |   19 ++++++++
>   block/sheepdog.c         |    9 ++--
>   block/stream.c           |  109 +++++++---------------------------------------
>   block/vdi.c              |    7 +++-
>   block_int.h              |    3 +-
>   hw/fdc.c                 |   20 ++++++++
>   hw/fdc.h                 |   24 +---------
>   hw/ide/piix.c            |    3 +-
>   hw/isa.h                 |    2 -
>   hw/pc_sysfw.c            |    1 +
>   include/qemu/ratelimit.h |   48 ++++++++++++++++++++
>   qemu-common.h            |    1 +
>   qemu-img-cmds.hx         |    4 +-
>   qemu-img.c               |   35 +++++++++++++-
>   qemu-img.texi            |    7 +++-
>   25 files changed, 369 insertions(+), 144 deletions(-)
>   create mode 100644 include/qemu/ratelimit.h
>
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2012-06-04 11:13 Kevin Wolf
  2012-06-07  1:17 ` Anthony Liguori
  0 siblings, 1 reply; 38+ messages in thread
From: Kevin Wolf @ 2012-06-04 11:13 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:

  target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)

are available in the git repository at:
  git://repo.or.cz/qemu/kevin.git for-anthony

Josh Durgin (1):
      rbd: hook up cache options

Kevin Wolf (3):
      qemu-img check -r for repairing images
      qemu-img check: Print fixed clusters and recheck
      qcow2: Support for fixing refcount inconsistencies

MORITA Kazutaka (1):
      sheepdog: add coroutine_fn markers to coroutine functions

Markus Armbruster (1):
      Un-inline fdctrl_init_isa()

Paolo Bonzini (4):
      block: implement is_allocated for raw
      stream: tweak usage of bdrv_co_is_allocated
      stream: move is_allocated_above to block.c
      stream: move rate limiting to a separate header file

Zhi Yong Wu (2):
      qcow2: remove a line of unnecessary code
      qcow2: fix the byte endian convertion

 block.c                  |   53 +++++++++++++++++++++-
 block.h                  |   13 +++++-
 block/qcow2-cluster.c    |    1 -
 block/qcow2-refcount.c   |   33 ++++++++++++--
 block/qcow2.c            |    5 +-
 block/qcow2.h            |    3 +-
 block/qed-check.c        |    2 +
 block/qed.c              |    5 +-
 block/raw-posix.c        |   98 +++++++++++++++++++++++++++++++++++++++++
 block/raw.c              |    8 +++
 block/rbd.c              |   19 ++++++++
 block/sheepdog.c         |    9 ++--
 block/stream.c           |  109 +++++++---------------------------------------
 block/vdi.c              |    7 +++-
 block_int.h              |    3 +-
 hw/fdc.c                 |   20 ++++++++
 hw/fdc.h                 |   24 +---------
 hw/ide/piix.c            |    3 +-
 hw/isa.h                 |    2 -
 hw/pc_sysfw.c            |    1 +
 include/qemu/ratelimit.h |   48 ++++++++++++++++++++
 qemu-common.h            |    1 +
 qemu-img-cmds.hx         |    4 +-
 qemu-img.c               |   35 +++++++++++++-
 qemu-img.texi            |    7 +++-
 25 files changed, 369 insertions(+), 144 deletions(-)
 create mode 100644 include/qemu/ratelimit.h

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [Qemu-devel] [PULL 00/12] Block patches
  2011-06-08 13:48 Kevin Wolf
@ 2011-06-09 12:39 ` Anthony Liguori
  0 siblings, 0 replies; 38+ messages in thread
From: Anthony Liguori @ 2011-06-09 12:39 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On 06/08/2011 08:48 AM, Kevin Wolf wrote:
> The following changes since commit a90d4690074526f54ad0851fce19fa6783f06803:
>
>    Add an isa device for SGA (2011-06-07 13:52:30 -0500)
>
> are available in the git repository at:
>    git://repo.or.cz/qemu/kevin.git for-anthony

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> Alexander Graf (1):
>        vmdk: fix endianness bugs
>
> Christoph Egger (2):
>        block/raw-posix: use a character device if a block device is given
>        block/raw-posix: get right partition size
>
> Christoph Hellwig (1):
>        block: clarify the meaning of BDRV_O_NOCACHE
>
> Josh Durgin (4):
>        rbd: use the higher level librbd instead of just librados
>        rbd: allow configuration of rados from the rbd filename
>        rbd: check return values when scheduling aio
>        rbd: Add bdrv_truncate implementation
>
> Kevin Wolf (4):
>        ide/core: Remove explicit setting of BM_STATUS_INT
>        qcow2: Fix memory leaks in error cases
>        bdrv_img_create: Fix segfault
>        qemu-img create: Fix displayed default cluster size
>
>   block.c                |   13 +-
>   block/qcow2-cluster.c  |    2 +-
>   block/qcow2-refcount.c |    9 +-
>   block/qcow2.c          |    7 +-
>   block/qcow2.h          |    2 +
>   block/qed.c            |    3 +-
>   block/raw-posix.c      |   77 ++++-
>   block/raw-win32.c      |   12 +-
>   block/rbd.c            |  896 ++++++++++++++++++------------------------------
>   block/rbd_types.h      |   71 ----
>   block/vdi.c            |    6 +-
>   block/vmdk.c           |   22 +-
>   blockdev.c             |    2 +-
>   configure              |   33 +--
>   hw/ide/core.c          |    7 +-
>   qemu-io.c              |    4 +-
>   qemu-nbd.c             |    2 +-
>   17 files changed, 461 insertions(+), 707 deletions(-)
>   delete mode 100644 block/rbd_types.h
>
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Qemu-devel] [PULL 00/12] Block patches
@ 2011-06-08 13:48 Kevin Wolf
  2011-06-09 12:39 ` Anthony Liguori
  0 siblings, 1 reply; 38+ messages in thread
From: Kevin Wolf @ 2011-06-08 13:48 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

The following changes since commit a90d4690074526f54ad0851fce19fa6783f06803:

  Add an isa device for SGA (2011-06-07 13:52:30 -0500)

are available in the git repository at:
  git://repo.or.cz/qemu/kevin.git for-anthony

Alexander Graf (1):
      vmdk: fix endianness bugs

Christoph Egger (2):
      block/raw-posix: use a character device if a block device is given
      block/raw-posix: get right partition size

Christoph Hellwig (1):
      block: clarify the meaning of BDRV_O_NOCACHE

Josh Durgin (4):
      rbd: use the higher level librbd instead of just librados
      rbd: allow configuration of rados from the rbd filename
      rbd: check return values when scheduling aio
      rbd: Add bdrv_truncate implementation

Kevin Wolf (4):
      ide/core: Remove explicit setting of BM_STATUS_INT
      qcow2: Fix memory leaks in error cases
      bdrv_img_create: Fix segfault
      qemu-img create: Fix displayed default cluster size

 block.c                |   13 +-
 block/qcow2-cluster.c  |    2 +-
 block/qcow2-refcount.c |    9 +-
 block/qcow2.c          |    7 +-
 block/qcow2.h          |    2 +
 block/qed.c            |    3 +-
 block/raw-posix.c      |   77 ++++-
 block/raw-win32.c      |   12 +-
 block/rbd.c            |  896 ++++++++++++++++++------------------------------
 block/rbd_types.h      |   71 ----
 block/vdi.c            |    6 +-
 block/vmdk.c           |   22 +-
 blockdev.c             |    2 +-
 configure              |   33 +--
 hw/ide/core.c          |    7 +-
 qemu-io.c              |    4 +-
 qemu-nbd.c             |    2 +-
 17 files changed, 461 insertions(+), 707 deletions(-)
 delete mode 100644 block/rbd_types.h

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2019-09-03 10:07 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 18:20 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 01/12] virtio-blk: Pass req to virtio_blk_handle_scsi_req Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 02/12] virtio-blk: Use blk_aio_ioctl Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 03/12] qcow2: Add two more unalignment checks Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 04/12] iotests: Add tests for more corruption cases Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 05/12] block: vmdk - make ret variable usage clear Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 06/12] block: vmdk - move string allocations from stack to the heap Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 07/12] block: qapi - move string allocation " Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 08/12] block: remove unused variable in bdrv_commit Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 09/12] block: mirror - change string allocation to 2-bytes Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 10/12] block: update string sizes for filename, backing_file, exact_filename Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 11/12] block: vhdx - force FileOffsetMB field to '0' for certain block states Kevin Wolf
2015-01-23 18:20 ` [Qemu-devel] [PULL 12/12] iotests: Lower 064's memory usage Kevin Wolf
2015-01-26 10:16 ` [Qemu-devel] [PULL 00/12] Block patches Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2019-08-27 20:16 Stefan Hajnoczi
2019-09-03 10:05 ` Peter Maydell
2017-05-26 19:23 Jeff Cody
2017-04-21 13:46 Jeff Cody
2017-04-21 16:55 ` Peter Maydell
2016-06-07 14:26 Stefan Hajnoczi
2016-06-07 15:34 ` Peter Maydell
2016-02-29 20:08 Jeff Cody
2016-03-01 10:34 ` Peter Maydell
2015-10-29 18:09 Stefan Hajnoczi
2015-10-30  9:40 ` Peter Maydell
2015-10-30 14:19   ` Markus Armbruster
2015-10-30 17:37     ` Peter Maydell
2015-10-30 21:59       ` Peter Maydell
2012-08-06 20:44 Kevin Wolf
2012-08-07  8:28 ` Paolo Bonzini
2012-08-07 15:36 ` Anthony Liguori
2012-06-04 11:13 Kevin Wolf
2012-06-07  1:17 ` Anthony Liguori
2012-06-08  9:48   ` Kevin Wolf
2012-06-08 14:07     ` Anthony Liguori
2012-06-08 14:57       ` Kevin Wolf
2011-06-08 13:48 Kevin Wolf
2011-06-09 12:39 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.