From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, rjones@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v2 for-1.5 2/4] block: Add hint to -EFBIG error message
Date: Tue, 14 May 2013 16:14:34 +0200 [thread overview]
Message-ID: <1368540876-30747-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1368540876-30747-1-git-send-email-kwolf@redhat.com>
The limit of qcow2 files at least depends on the cluster size. If the
image format has a cluster_size option, suggest to increase it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index aa9a533..3f87489 100644
--- a/block.c
+++ b/block.c
@@ -4857,8 +4857,12 @@ void bdrv_img_create(const char *filename, const char *fmt,
error_setg(errp,"Formatting or formatting option not supported for "
"file format '%s'", fmt);
} else if (ret == -EFBIG) {
- error_setg(errp, "The image size is too large for file format '%s'",
- fmt);
+ const char *cluster_size_hint = "";
+ if (get_option_parameter(create_options, BLOCK_OPT_CLUSTER_SIZE)) {
+ cluster_size_hint = " (try using a larger cluster size)";
+ }
+ error_setg(errp, "The image size is too large for file format '%s'%s",
+ fmt, cluster_size_hint);
} else {
error_setg(errp, "%s: error while creating %s: %s", filename, fmt,
strerror(-ret));
--
1.8.1.4
next prev parent reply other threads:[~2013-05-14 14:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 14:14 [Qemu-devel] [PATCH v2 for-1.5 0/4] qcow2: Catch some L1 table index overflows Kevin Wolf
2013-05-14 14:14 ` [Qemu-devel] [PATCH v2 for-1.5 1/4] " Kevin Wolf
2013-05-14 14:49 ` Stefan Hajnoczi
2013-05-14 14:14 ` Kevin Wolf [this message]
2013-05-14 14:49 ` [Qemu-devel] [PATCH v2 for-1.5 2/4] block: Add hint to -EFBIG error message Stefan Hajnoczi
2013-05-14 14:14 ` [Qemu-devel] [PATCH v2 3/4] qcow2.py: Subcommand for changing header fields Kevin Wolf
2013-05-14 14:14 ` [Qemu-devel] [PATCH v2 4/4] qemu-iotests: Try creating huge qcow2 image Kevin Wolf
2013-05-14 16:18 ` [Qemu-devel] [PATCH v2 for-1.5 0/4] qcow2: Catch some L1 table index overflows Richard W.M. Jones
2013-05-15 8:28 ` Stefan Hajnoczi
2013-05-16 9:26 ` Stefan Hajnoczi
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=1368540876-30747-3-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=stefanha@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.