From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcGcr-0005BF-Eq for qemu-devel@nongnu.org; Tue, 14 May 2013 10:54:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcGcj-0008OZ-Kg for qemu-devel@nongnu.org; Tue, 14 May 2013 10:54:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcGcj-0008ON-CW for qemu-devel@nongnu.org; Tue, 14 May 2013 10:54:41 -0400 From: Stefan Hajnoczi Date: Tue, 14 May 2013 16:54:29 +0200 Message-Id: <1368543269-29784-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1368543269-29784-1-git-send-email-stefanha@redhat.com> References: <1368543269-29784-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] block: Add hint to -EFBIG error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi From: Kevin Wolf 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 Signed-off-by: Stefan Hajnoczi --- 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