From nobody Sat Apr 27 07:24:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501857697304677.1404738360079; Fri, 4 Aug 2017 07:41:37 -0700 (PDT) Received: from localhost ([::1]:35213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dddnD-0000hQ-T3 for importer@patchew.org; Fri, 04 Aug 2017 10:41:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dddjm-0005tI-6w for qemu-devel@nongnu.org; Fri, 04 Aug 2017 10:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dddjZ-0004bN-JH for qemu-devel@nongnu.org; Fri, 04 Aug 2017 10:38:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53594) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dddiq-0003uJ-9R; Fri, 04 Aug 2017 10:37:04 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3254152748; Fri, 4 Aug 2017 14:37:03 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-95.pek2.redhat.com [10.72.12.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C6E790C0D; Fri, 4 Aug 2017 14:36:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3254152748 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 4 Aug 2017 22:36:58 +0800 Message-Id: <20170804143658.23020-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 04 Aug 2017 14:37:03 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] qemu-img: Clarify about relative backing file options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It's not too surprising when a user specifies the backing file relative to the current working directory instead of the top layer image. This causes error when they differ. Though the error message has enough information to infer the fact about the misunderstanding, it is better if we document this explicitly, so that users don't have to learn from mistakes. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Reviewed-by: Stefan Hajnoczi --- v2: Improve wording. [Eric] --- qemu-img.texi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qemu-img.texi b/qemu-img.texi index 72dabd6b3e..90c7eab4a8 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -244,6 +244,9 @@ only the differences from @var{backing_file}. No size n= eeds to be specified in this case. @var{backing_file} will never be modified unless you use the @code{commit} monitor command (or qemu-img commit). =20 +If a relative path name is given, the backing file is looked up relative to +the directory containing @var{filename}. + Note that a given backing file will be opened to check that it is valid. U= se the @code{-u} option to enable unsafe backing file mode, which means that = the image will be created even if the associated backing file cannot be opened= . A @@ -343,6 +346,9 @@ created as a copy on write image of the specified base = image; the @var{backing_file} should have the same content as the input's base image, however the path, image format, etc may differ. =20 +If a relative path name is given, the backing file is looked up relative to +the directory containing @var{output_filename}. + If the @code{-n} option is specified, the target volume creation will be skipped. This is useful for formats such as @code{rbd} if the target volume has already been created with site specific options that cannot @@ -490,6 +496,9 @@ The backing file is changed to @var{backing_file} and (= if the image format of string), then the image is rebased onto no backing file (i.e. it will exist independently of any backing file). =20 +If a relative path name is given, the backing file is looked up relative to +the directory containing @var{filename}. + @var{cache} specifies the cache mode to be used for @var{filename}, whereas @var{src_cache} specifies the cache mode for reading backing files. =20 --=20 2.13.3