From patchwork Thu Sep 26 00:16:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 278049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B31462C009C for ; Thu, 26 Sep 2013 10:22:16 +1000 (EST) Received: from localhost ([::1]:55522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOzLS-0006Os-Gi for incoming@patchwork.ozlabs.org; Wed, 25 Sep 2013 20:22:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOzFx-00078O-UJ for qemu-devel@nongnu.org; Wed, 25 Sep 2013 20:16:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOzFn-00021j-8J for qemu-devel@nongnu.org; Wed, 25 Sep 2013 20:16:33 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:46882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOzFm-00021C-JH for qemu-devel@nongnu.org; Wed, 25 Sep 2013 20:16:23 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Sep 2013 05:46:19 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp05.in.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 26 Sep 2013 05:46:16 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id E5B93394004D for ; Thu, 26 Sep 2013 05:46:00 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8Q0GDw639452782 for ; Thu, 26 Sep 2013 05:46:13 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8Q0GF3N028423 for ; Thu, 26 Sep 2013 05:46:16 +0530 Received: from RH64wenchao ([9.181.129.59]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r8Q0GAS2028311; Thu, 26 Sep 2013 05:46:14 +0530 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Thu, 26 Sep 2013 08:16:04 +0800 Message-Id: <1380154568-5339-4-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1380154568-5339-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1380154568-5339-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13092600-8256-0000-0000-00000961F402 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.5 Cc: kwolf@redhat.com, pbonzini@redhat.com, Wenchao Xia , stefanha@gmail.com Subject: [Qemu-devel] [PATCH V3 3/7] qemu-nbd: add doc for internal snapshot export 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 Signed-off-by: Wenchao Xia --- qemu-nbd.c | 11 ++++++++++- qemu-nbd.texi | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 6588a1f..49dfc14 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -80,7 +80,16 @@ static void usage(const char *name) "\n" "Block device options:\n" " -r, --read-only export read-only\n" -" -s, --snapshot use snapshot file\n" +" -s, --snapshot use FILE as an external snapshot, create a temporary\n" +" file with backing_file=FILE, redirect the write to\n" +" the temporary one\n" +" -l, --load-snapshot=SNAPSHOT_ID_OR_NAME\n" +" load an internal snapshot inside FILE and export it\n" +" as an read-only device\n" +" -L, --load-snapshot1=SNAPSHOT_PARAM\n" +" load an internal snapshot inside FILE and export it\n" +" as an read-only device, SNAPSHOT_PARAM format is\n" +" 'snapshot.id=[ID],snapshot.name=[NAME]'\n" " -n, --nocache disable host cache\n" " --cache=MODE set cache mode (none, writeback, ...)\n" #ifdef CONFIG_LINUX_AIO diff --git a/qemu-nbd.texi b/qemu-nbd.texi index 6055ec6..5940905 100644 --- a/qemu-nbd.texi +++ b/qemu-nbd.texi @@ -27,7 +27,16 @@ Export QEMU disk image using NBD protocol. @item -P, --partition=@var{num} only expose partition @var{num} @item -s, --snapshot - use snapshot file + use @var{filename} as an external snapshot, create a temporary + file with backing_file=@var{filename}, redirect the write to + the temporary one +@item -l, --load-snapshot=@var{snapshot_id_or_name} + load an internal snapshot inside @var{filename} and export it + as an read-only device +@item -L, --load-snapshot1=@var{snapshot_param} + load an internal snapshot inside @var{filename} and export it + as an read-only device, @var{snapshot_param} format is + 'snapshot.id=[ID],snapshot.name=[NAME]' @item -n, --nocache @itemx --cache=@var{cache} set cache mode to be used with the file. See the documentation of