rbd.c (1270a3f57c9221080f3205a15964814ff8359ca9) | rbd.c (fb2575f95411644abe7f0606594035b63a5132ad) |
---|---|
1/* 2 * QEMU Block driver for RADOS (Ceph) 3 * 4 * Copyright (C) 2010-2011 Christian Brunner <chb@muc.de>, 5 * Josh Durgin <josh.durgin@dreamhost.com> 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2. See 8 * the COPYING file in the top-level directory. --- 1276 unchanged lines hidden (view full) --- 1285 1286 if (cmd == RBD_AIO_WRITE || cmd == RBD_AIO_WRITE_ZEROES) { 1287 /* 1288 * RBD APIs don't allow us to write more than actual size, so in order 1289 * to support growing images, we resize the image before write 1290 * operations that exceed the current size. 1291 */ 1292 if (offset + bytes > s->image_size) { | 1/* 2 * QEMU Block driver for RADOS (Ceph) 3 * 4 * Copyright (C) 2010-2011 Christian Brunner <chb@muc.de>, 5 * Josh Durgin <josh.durgin@dreamhost.com> 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2. See 8 * the COPYING file in the top-level directory. --- 1276 unchanged lines hidden (view full) --- 1285 1286 if (cmd == RBD_AIO_WRITE || cmd == RBD_AIO_WRITE_ZEROES) { 1287 /* 1288 * RBD APIs don't allow us to write more than actual size, so in order 1289 * to support growing images, we resize the image before write 1290 * operations that exceed the current size. 1291 */ 1292 if (offset + bytes > s->image_size) { |
1293 int r = qemu_rbd_resize(bs, offset + bytes); | 1293 r = qemu_rbd_resize(bs, offset + bytes); |
1294 if (r < 0) { 1295 return r; 1296 } 1297 } 1298 } 1299 1300 r = rbd_aio_create_completion(&task, 1301 (rbd_callback_t) qemu_rbd_completion_cb, &c); --- 550 unchanged lines hidden --- | 1294 if (r < 0) { 1295 return r; 1296 } 1297 } 1298 } 1299 1300 r = rbd_aio_create_completion(&task, 1301 (rbd_callback_t) qemu_rbd_completion_cb, &c); --- 550 unchanged lines hidden --- |