From patchwork Sun Sep 22 09:39:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 276958 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 F3AB82C00AD for ; Sun, 22 Sep 2013 19:42:21 +1000 (EST) Received: from localhost ([::1]:34541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNgBI-0005Ht-4u for incoming@patchwork.ozlabs.org; Sun, 22 Sep 2013 05:42:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNg9S-0002w5-LN for qemu-devel@nongnu.org; Sun, 22 Sep 2013 05:40:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNg9J-00046g-E0 for qemu-devel@nongnu.org; Sun, 22 Sep 2013 05:40:26 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:42767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNg9I-00044y-P4 for qemu-devel@nongnu.org; Sun, 22 Sep 2013 05:40:17 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 22 Sep 2013 15:10:05 +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; Sun, 22 Sep 2013 15:10:02 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 91339394004D for ; Sun, 22 Sep 2013 15:09:47 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8M9gBwr46465066 for ; Sun, 22 Sep 2013 15:12: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 r8M9dxxc032541 for ; Sun, 22 Sep 2013 15:09:59 +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 r8M9ds4G032443; Sun, 22 Sep 2013 15:09:58 +0530 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Sun, 22 Sep 2013 17:39:50 +0800 Message-Id: <1379842791-3776-4-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1379842791-3776-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1379842791-3776-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13092209-8256-0000-0000-0000095351CC 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 V2 3/4] 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 | 8 +++++++- qemu-nbd.texi | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index e450d04..8cb4bf1 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -80,7 +80,13 @@ 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, --snapshot-load=PARAM\n" +" load an internal snapshot inside FILE and export it\n" +" as an read-only device, PARAM format is\n" +" 'id=[ID],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..69e9e9a 100644 --- a/qemu-nbd.texi +++ b/qemu-nbd.texi @@ -27,7 +27,13 @@ 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, --snapshot-load=@var{param} + load an internal snapshot inside @var{filename} and export it + as an read-only device, @var{param} format is + 'id=[ID],name=[NAME]' @item -n, --nocache @itemx --cache=@var{cache} set cache mode to be used with the file. See the documentation of