Skip to contentSkip to conversation

Block patches for 2.5.0-rc1

GIT PULL Applied Kevin Wolf 2 participants 6 messages Nov 18, 2015

lore
Share & tools
lore
author
#1 lore raw

[Qemu-devel] [PULL 1/4] nand: fix address overflow

In reply to Kevin Wolf

From: Rabin Vincent <[email protected]>

The shifts of the address mask and value shift beyond 32 bits when there are 5 address cycles.

---
 hw/block/nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/block/nand.c +2 -2
index 61d2cec..a68266f 100644
@@ -522,8 +522,8 @@ void nand_setio(DeviceState *dev, uint32_t value)
 
     if (s->ale) {
         unsigned int shift = s->addrlen * 8;
-        unsigned int mask = ~(0xff << shift);
-        unsigned int v = value << shift;
+        uint64_t mask = ~(0xffull << shift);
+        uint64_t v = (uint64_t)value << shift;
 
         s->addr = (s->addr & mask) | v;
         s->addrlen ++;
Signature · 1 line
1.8.3.1
author
#2 lore raw

[Qemu-devel] [PULL 3/4] blockdev: Add missing bdrv_unref() in drive-backup

In reply to Kevin Wolf

From: Max Reitz <[email protected]>

All error paths after a successful bdrv_open() of target_bs should contain a bdrv_unref(target_bs). This one did not yet, so add it.

---
 blockdev.c | 1 +
 1 file changed, 1 insertion(+)
blockdev.c +1 -0
index 917ae06..07c1741 100644
@@ -3171,6 +3171,7 @@ static void do_drive_backup(const char *device, const char *target,
         bmap = bdrv_find_dirty_bitmap(bs, bitmap);
         if (!bmap) {
             error_setg(errp, "Bitmap '%s' could not be found", bitmap);
+            bdrv_unref(target_bs);
             goto out;
         }
     }
Signature · 1 line
1.8.3.1

Kevin Wolf

author
#0 lore raw

The following changes since commit ab9b872ab3147faf3c04e91d525815b9139dd996:

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-11-13-v2-tag' into staging (2015-11-18 12:47:29 +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 ca4fa82fe66076284f702adcfe7c319ebbf909ec:

Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-18' into queue-block (2015-11-18 16:27:44 +0100)

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

Block layer patches

----------------------------------------------------------------
Alberto Garcia (1):
block: Call external_snapshot_clean after blockdev-snapshot

John Snow (1):
iotests: fix race in 030

Kevin Wolf (1):
Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-18' into queue-block

Max Reitz (1):
blockdev: Add missing bdrv_unref() in drive-backup

Rabin Vincent (1):
nand: fix address overflow

 blockdev.c             | 2 ++
 hw/block/nand.c        | 4 ++--
 tests/qemu-iotests/030 | 5 ++++-
 3 files changed, 8 insertions(+), 3 deletions(-)
author
#3 lore raw

[Qemu-devel] [PULL 4/4] block: Call external_snapshot_clean after blockdev-snapshot

From: Alberto Garcia <[email protected]>

Otherwise the AioContext will never be released.

Message-id: [email protected]

---
 blockdev.c | 1 +
 1 file changed, 1 insertion(+)
blockdev.c +1 -0
index 07c1741..313841b 100644
@@ -2098,6 +2098,7 @@ static const BlkActionOps actions[] = {
         .prepare  = external_snapshot_prepare,
         .commit   = external_snapshot_commit,
         .abort = external_snapshot_abort,
+        .clean = external_snapshot_clean,
     },
     [TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT_SYNC] = {
         .instance_size = sizeof(ExternalSnapshotState),
Signature · 1 line
1.8.3.1
author
#4 lore raw

[Qemu-devel] [PULL 2/4] iotests: fix race in 030

In reply to Kevin Wolf

From: John Snow <[email protected]>

the stop_test case tests that we can resume a block-stream command after it has stopped/paused due to error. We cannot always reliably query it before it finishes after resume, though, so make this a conditional.

The important thing is that we are still testing that it has stopped, and that it finishes successfully after we send a resume command.

---
 tests/qemu-iotests/030 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/qemu-iotests/030 +4 -1
index 952a524..32469ef 100755
@@ -245,6 +245,7 @@ class TestEIO(TestErrors):
         while not completed:
             for event in self.vm.get_qmp_events(wait=True):
                 if event['event'] == 'BLOCK_JOB_ERROR':
+                    error = True
                     self.assert_qmp(event, 'data/device', 'drive0')
                     self.assert_qmp(event, 'data/operation', 'read')
 
@@ -257,9 +258,11 @@ class TestEIO(TestErrors):
                     self.assert_qmp(result, 'return', {})
 
                     result = self.vm.qmp('query-block-jobs')
+                    if result == {'return': []}:
+                        # Race; likely already finished. Check.
+                        continue
                     self.assert_qmp(result, 'return[0]/paused', False)
                     self.assert_qmp(result, 'return[0]/io-status', 'ok')
-                    error = True
                 elif event['event'] == 'BLOCK_JOB_COMPLETED':
                     self.assertTrue(error, 'job completed unexpectedly')
                     self.assert_qmp(event, 'data/type', 'stream')
Signature · 1 line
1.8.3.1
#5 lore raw
In reply to Kevin Wolf
Quoted 24 lines · Kevin Wolf

The following changes since commit ab9b872ab3147faf3c04e91d525815b9139dd996:

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-11-13-v2-tag' into staging (2015-11-18 12:47:29 +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 ca4fa82fe66076284f702adcfe7c319ebbf909ec:

Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-18' into queue-block (2015-11-18 16:27:44 +0100)

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

Block layer patches

----------------------------------------------------------------
Alberto Garcia (1):
block: Call external_snapshot_clean after blockdev-snapshot

John Snow (1):
iotests: fix race in 030

Quoted 8 lines

Kevin Wolf (1):
Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-18' into queue-block

Max Reitz (1):
blockdev: Add missing bdrv_unref() in drive-backup

Rabin Vincent (1):
nand: fix address overflow

Applied, thanks.

-- PMM