aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-01-02 12:19:27 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-02 12:19:27 -0600
commit217da7fdeb2a4c99c49f22f9dc64c8df2e3a4387 (patch)
tree8b5e91974d20566398b3a74d08392a26c13f2141 /block/sheepdog.c
parent9a8a5ae69d3a436e51a7eb2edafe254572f60823 (diff)
parentd6b1ef89a1ede41334e4d0fa27e600e0b4d4f209 (diff)
Merge remote-tracking branch 'stefanha/block' into staging
* stefanha/block: sheepdog: pass oid directly to send_pending_req() sheepdog: don't update inode when create_and_write fails block/raw-win32: Fix compiler warnings (wrong format specifiers) qemu-img: report size overflow error message cutils: change strtosz_suffix_unit function virtio-blk: Return UNSUPP for unknown request types virtio-blk: add x-data-plane=on|off performance feature dataplane: add virtio-blk data plane code virtio-blk: restore VirtIOBlkConf->config_wce flag iov: add qemu_iovec_concat_iov() test-iov: add iov_discard_front/back() testcases iov: add iov_discard_front/back() to remove data dataplane: add Linux AIO request queue dataplane: add event loop dataplane: add virtqueue vring code dataplane: add host memory mapping code configure: add CONFIG_VIRTIO_BLK_DATA_PLANE raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 13dc023fdb..e821746116 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -714,16 +714,17 @@ static void coroutine_fn aio_read_response(void *opaque)
* and max_dirty_data_idx are changed to include updated
* index between them.
*/
- s->inode.data_vdi_id[idx] = s->inode.vdi_id;
- s->max_dirty_data_idx = MAX(idx, s->max_dirty_data_idx);
- s->min_dirty_data_idx = MIN(idx, s->min_dirty_data_idx);
-
+ if (rsp.result == SD_RES_SUCCESS) {
+ s->inode.data_vdi_id[idx] = s->inode.vdi_id;
+ s->max_dirty_data_idx = MAX(idx, s->max_dirty_data_idx);
+ s->min_dirty_data_idx = MIN(idx, s->min_dirty_data_idx);
+ }
/*
* Some requests may be blocked because simultaneous
* create requests are not allowed, so we search the
* pending requests here.
*/
- send_pending_req(s, vid_to_data_oid(s->inode.vdi_id, idx));
+ send_pending_req(s, aio_req->oid);
}
break;
case AIOCB_READ_UDATA: