Skip to contentSkip to conversation

Block patches

GIT PULL Applied Stefan Hajnoczi 2 participants 4 messages Nov 24, 2015 Block layer

lore
Share & tools
lore
#0 lore raw

The following changes since commit 5522a841cab5f15ac0f8d207b320c21755a7a1a5:

Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging (2015-11-23 16:07:49 +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 466138dc689b6b14f31d5d20316affb4b4efd177:

virtio-blk: Move resetting of req->mr_next to virtio_blk_handle_rw_error (2015-11-24 09:27:49 +0800)

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

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

Fam Zheng (1):
virtio-blk: Move resetting of req->mr_next to
virtio_blk_handle_rw_error

Vladimir Sementsov-Ogievskiy (1):
parallels: dirty BAT properly for continuous allocations

 block/parallels.c     | 2 +-
 hw/block/virtio-blk.c | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

[Qemu-devel] [PULL for-2.5 1/2] parallels: dirty BAT properly for continuous allocations

From: Vladimir Sementsov-Ogievskiy <[email protected]>

This patch marks part of the BAT dirty properly. There is a possibility that multy-block allocation could have one block allocated on one BAT page and next block on the next page. The code without the patch could not save updated position to the file.

Message-id: [email protected]

---
 block/parallels.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/parallels.c +1 -1
index 4f79293..f689fde 100644
@@ -220,7 +220,7 @@ static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num,
         s->bat_bitmap[idx + i] = cpu_to_le32(s->data_end / s->off_multiplier);
         s->data_end += s->tracks;
         bitmap_set(s->bat_dirty_bmap,
-                   bat_entry_off(idx) / s->bat_dirty_block, 1);
+                   bat_entry_off(idx + i) / s->bat_dirty_block, 1);
     }
 
     return bat2sect(s, idx) + sector_num % s->tracks;
Signature · 1 line
2.5.0
#2 lore raw

[Qemu-devel] [PULL for-2.5 2/2] virtio-blk: Move resetting of req->mr_next to virtio_blk_handle_rw_error

In reply to Stefan Hajnoczi

From: Fam Zheng <[email protected]>

"werror=report" would free the req in virtio_blk_handle_rw_error, we mustn't write to it in that case.

Message-id: [email protected]

---
 hw/block/virtio-blk.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
hw/block/virtio-blk.c +3 -4
index 848f3fe..756ae5c 100644
@@ -72,6 +72,9 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
     VirtIOBlock *s = req->dev;
 
     if (action == BLOCK_ERROR_ACTION_STOP) {
+        /* Break the link as the next request is going to be parsed from the
+         * ring again. Otherwise we may end up doing a double completion! */
+        req->mr_next = NULL;
         req->next = s->rq;
         s->rq = req;
     } else if (action == BLOCK_ERROR_ACTION_REPORT) {
@@ -112,10 +115,6 @@ static void virtio_blk_rw_complete(void *opaque, int ret)
              * happen on the other side of the migration).
              */
             if (virtio_blk_handle_rw_error(req, -ret, is_read)) {
-                /* Break the link in case the next request is added to the
-                 * restart queue and is going to be parsed from the ring again.
-                 */
-                req->mr_next = NULL;
                 continue;
             }
         }
Signature · 1 line
2.5.0
#3 lore raw
In reply to Stefan Hajnoczi
Quoted 20 lines · Stefan Hajnoczi

The following changes since commit 5522a841cab5f15ac0f8d207b320c21755a7a1a5:

Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging (2015-11-23 16:07:49 +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 466138dc689b6b14f31d5d20316affb4b4efd177:

virtio-blk: Move resetting of req->mr_next to virtio_blk_handle_rw_error (2015-11-24 09:27:49 +0800)

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

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

Fam Zheng (1):
virtio-blk: Move resetting of req->mr_next to
virtio_blk_handle_rw_error

Quoted 6 lines

Vladimir Sementsov-Ogievskiy (1):
parallels: dirty BAT properly for continuous allocations

 block/parallels.c     | 2 +-
 hw/block/virtio-blk.c | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

Applied, thanks.

-- PMM