-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1 iQEcBAABAgAGBQJWVBn3AAoJEJykq7OBq3PIphAIALLVgtvJ3zc/guRIf2QzM4Zv GPmk2DDze0N1DhKOtxpWi7nZLI1Fkb/msCr/wSVmNbwxJWyDSt7qrVG5HLlAR+wC R0gBvsuS/Y/MXyK+5z8wRU0IgjV/ihvVkKva6jAliZ1fnzRK3Z7iR7g/wcJuuLBG gELOuYqydrwEr3dj39v16m0JwbVbLBay4iEaVT31LTjfxmxbsRXJP+fWrfsD/tIA XfMqe1sucvQuVVUuktjh08vY91/ETCYGYRHYHKHw4h40dZYVlvB/jfWGgJ8kwVTr JH0LLHMuF6FHosk/aFvNcvGxyeY+8K6uS8ulJRSJj0nRzJYCrlF4pRe+0QGPvns= =bSVJ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging # gpg: Signature made Tue 24 Nov 2015 08:04:07 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: virtio-blk: Move resetting of req->mr_next to virtio_blk_handle_rw_error parallels: dirty BAT properly for continuous allocations Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
229c0372cf
|
@ -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->bat_bitmap[idx + i] = cpu_to_le32(s->data_end / s->off_multiplier);
|
||||||
s->data_end += s->tracks;
|
s->data_end += s->tracks;
|
||||||
bitmap_set(s->bat_dirty_bmap,
|
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;
|
return bat2sect(s, idx) + sector_num % s->tracks;
|
||||||
|
|
|
@ -72,6 +72,9 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
|
||||||
VirtIOBlock *s = req->dev;
|
VirtIOBlock *s = req->dev;
|
||||||
|
|
||||||
if (action == BLOCK_ERROR_ACTION_STOP) {
|
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;
|
req->next = s->rq;
|
||||||
s->rq = req;
|
s->rq = req;
|
||||||
} else if (action == BLOCK_ERROR_ACTION_REPORT) {
|
} 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).
|
* happen on the other side of the migration).
|
||||||
*/
|
*/
|
||||||
if (virtio_blk_handle_rw_error(req, -ret, is_read)) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue