diff options
Diffstat (limited to 'block/gluster.c')
-rw-r--r-- | block/gluster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/gluster.c b/block/gluster.c index 1912cf9d07..65c7a58062 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -494,8 +494,8 @@ static int qemu_gluster_create(const char *filename, goto out; } - total_size = - qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0) / BDRV_SECTOR_SIZE; + total_size = DIV_ROUND_UP(qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0), + BDRV_SECTOR_SIZE); tmp = qemu_opt_get_del(opts, BLOCK_OPT_PREALLOC); if (!tmp || !strcmp(tmp, "off")) { |