[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 08/12] block/blklogwrites: Change log_sector_size
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL v2 08/12] block/blklogwrites: Change log_sector_size from int64_t to uint64_t |
Date: |
Thu, 5 Jul 2018 12:26:00 +0200 |
From: Ari Sundholm <address@hidden>
This was a simple oversight when working on intermediate versions
of the original patch which introduced blklogwrites.
Signed-off-by: Ari Sundholm <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/blklogwrites.c | 8 +++-----
1 file 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;
}
--
2.13.6
- [Qemu-devel] [PULL v2 00/12] Block layer patches, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 01/12] qemu-img: allow compressed not-in-order writes, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 02/12] qcow2: refactor data compression, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 04/12] block: Move two block permission constants to the relevant enum, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 03/12] qcow2: add compress threads, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 08/12] block/blklogwrites: Change log_sector_size from int64_t to uint64_t,
Kevin Wolf <=
- [Qemu-devel] [PULL v2 11/12] file-posix: Fix creation locking, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 06/12] block: Don't silently truncate node names, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 05/12] block: Add blklogwrites, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 12/12] file-posix: Unlock FD after creation, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 07/12] block/crypto: Fix memory leak in create error path, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 10/12] block/blklogwrites: Add an option for the update interval of the log superblock, Kevin Wolf, 2018/07/05
- [Qemu-devel] [PULL v2 09/12] block/blklogwrites: Add an option for appending to an old log, Kevin Wolf, 2018/07/05
- Re: [Qemu-devel] [PULL v2 00/12] Block layer patches, Peter Maydell, 2018/07/05