From: Ari Sundholm <ari@tuxera.com>
To: qemu-devel@nongnu.org
Cc: Ari Sundholm <ari@tuxera.com>, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>,
"open list:blklogwrites" <qemu-block@nongnu.org>
Subject: [Qemu-devel] [PATCH v2 1/3] block/blklogwrites: Change log_sector_size from int64_t to uint64_t
Date: Wed, 4 Jul 2018 17:59:34 +0300 [thread overview]
Message-ID: <1530716376-2235-2-git-send-email-ari@tuxera.com> (raw)
In-Reply-To: <1530716376-2235-1-git-send-email-ari@tuxera.com>
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>
---
block/blklogwrites.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
index 47093fa..272e11a 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.7.4
next prev parent reply other threads:[~2018-07-04 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 14:59 [Qemu-devel] [PATCH v2 0/3] blklogwrites improvements Ari Sundholm
2018-07-04 14:59 ` Ari Sundholm [this message]
2018-07-04 14:59 ` [Qemu-devel] [PATCH v2 2/3] block/blklogwrites: Add an option for appending to an old log Ari Sundholm
2018-07-04 14:59 ` [Qemu-devel] [PATCH v2 3/3] block/blklogwrites: Add an option for the update interval of the log superblock Ari Sundholm
2018-07-05 9:07 ` [Qemu-devel] [PATCH v2 0/3] blklogwrites improvements Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530716376-2235-2-git-send-email-ari@tuxera.com \
--to=ari@tuxera.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).