From patchwork Tue May 14 14:14:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 243721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0D61E2C0085 for ; Wed, 15 May 2013 00:17:33 +1000 (EST) Received: from localhost ([::1]:56374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcG2l-0003tk-58 for incoming@patchwork.ozlabs.org; Tue, 14 May 2013 10:17:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcG08-0001T1-Tu for qemu-devel@nongnu.org; Tue, 14 May 2013 10:14:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcG03-0003KW-NS for qemu-devel@nongnu.org; Tue, 14 May 2013 10:14:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcG03-0003KM-FP for qemu-devel@nongnu.org; Tue, 14 May 2013 10:14:43 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4EEEgh4011853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 May 2013 10:14:43 -0400 Received: from dhcp-200-207.str.redhat.com (dhcp-192-246.str.redhat.com [10.33.192.246]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4EEEcST009297; Tue, 14 May 2013 10:14:41 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Tue, 14 May 2013 16:14:34 +0200 Message-Id: <1368540876-30747-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1368540876-30747-1-git-send-email-kwolf@redhat.com> References: <1368540876-30747-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 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 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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));