aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorAri Sundholm <ari@tuxera.com>2018-07-04 17:59:34 +0300
committerKevin Wolf <kwolf@redhat.com>2018-07-05 10:50:20 +0200
commit2dacaf7c82c2771d507e5e59efcea78d933baca9 (patch)
tree0a31e3dea5fe161f9258bbca6cd05d0abe0b3f19 /block
parent0b68589d17ef2ea78b3cf016525db13cee1d99e7 (diff)
block/blklogwrites: Change log_sector_size from int64_t to uint64_t
This was a simple oversight when working on intermediate versions of the original patch which introduced blklogwrites. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/blklogwrites.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
index 47093fadd6..272e11a021 100644
--- a/block/blklogwrites.c
+++ b/block/blklogwrites.c
@@ -79,7 +79,7 @@ static int blk_log_writes_open(BlockDriverState *bs, QDict *options, int flags,
QemuOpts *opts;
Error *local_err = NULL;
int ret;
- int64_t log_sector_size;
+ uint64_t log_sector_size;
opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
qemu_opts_absorb_qdict(opts, options, &local_err);
@@ -101,11 +101,9 @@ static int blk_log_writes_open(BlockDriverState *bs, QDict *options, int flags,
log_sector_size = qemu_opt_get_size(opts, "log-sector-size",
BDRV_SECTOR_SIZE);
- if (log_sector_size < 0 || log_sector_size > (1ull << 23) ||
- !is_power_of_2(log_sector_size))
- {
+ if (log_sector_size > (1ull << 23) || !is_power_of_2(log_sector_size)) {
ret = -EINVAL;
- error_setg(errp, "Invalid log sector size %"PRId64, log_sector_size);
+ error_setg(errp, "Invalid log sector size %"PRIu64, log_sector_size);
goto fail;
}