diff options
Diffstat (limited to 'block/rbd.c')
-rw-r--r-- | block/rbd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/rbd.c b/block/rbd.c index ea969e7beb..b7f7d5ff30 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -314,7 +314,8 @@ static int qemu_rbd_create(const char *filename, QemuOpts *opts, Error **errp) } /* Read out options */ - bytes = qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0); + bytes = ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0), + BDRV_SECTOR_SIZE); objsize = qemu_opt_get_size_del(opts, BLOCK_OPT_CLUSTER_SIZE, 0); if (objsize) { if ((objsize - 1) & objsize) { /* not a power of 2? */ |