From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 From: Wenchao Xia Date: Sun, 22 Sep 2013 17:39:50 +0800 Message-Id: <1379842791-3776-4-git-send-email-xiawenc@linux.vnet.ibm.com> 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> Subject: [Qemu-devel] [PATCH V2 3/4] qemu-nbd: add doc for internal snapshot export List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, Wenchao Xia , stefanha@gmail.com 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 -- 1.7.1