From patchwork Mon Nov 24 07:27:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 5363681 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6F6439F2F5 for ; Mon, 24 Nov 2014 07:29:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99A9420374 for ; Mon, 24 Nov 2014 07:29:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B755E20361 for ; Mon, 24 Nov 2014 07:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752454AbaKXH3u (ORCPT ); Mon, 24 Nov 2014 02:29:50 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:62316 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752212AbaKXH3t (ORCPT ); Mon, 24 Nov 2014 02:29:49 -0500 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="43874626" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 24 Nov 2014 15:26:31 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id sAO7TSI1005907 for ; Mon, 24 Nov 2014 15:29:29 +0800 Received: from localhost.localdomain (10.167.226.33) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Mon, 24 Nov 2014 15:29:49 +0800 From: Qu Wenruo To: Subject: [PATCH] btrfs-progs: Doc: Add explain on 'source' and 'target' for btrfs-image. Date: Mon, 24 Nov 2014 15:27:44 +0800 Message-ID: <1416814064-29543-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.1.3 MIME-Version: 1.0 X-Originating-IP: [10.167.226.33] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add explain on 'source' and 'target', which is somewhat confusing for users who want to restore dumped image. Signed-off-by: Qu Wenruo --- Documentation/btrfs-image.txt | 5 +++++ btrfs-image.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Documentation/btrfs-image.txt b/Documentation/btrfs-image.txt index b7751f9..43c2e06 100644 --- a/Documentation/btrfs-image.txt +++ b/Documentation/btrfs-image.txt @@ -14,6 +14,11 @@ DESCRIPTION *btrfs-image* is used to create an image of a btrfs filesystem. All data will be zeroed, but metadata and the like is preserved. +Without '-r' option, is the device/normal file containing the btrfs, +and is the output image file, or standard output if is '-'. +With '-r' option, is the dump image file and is the +device/normal file where the restored fs lies. + Mainly used for debug purpose. OPTIONS diff --git a/btrfs-image.c b/btrfs-image.c index cb17f16..12f04b7 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -2459,6 +2459,8 @@ out: static void print_usage(void) { fprintf(stderr, "usage: btrfs-image [options] source target\n"); + fprintf(stderr, "Without '-r' source is the btrfs fs and target is output image('-' for stdout)\n"); + fprintf(stderr, "With '-r' source is the dumped image and target is the btrfs fs\n"); fprintf(stderr, "\t-r \trestore metadump image\n"); fprintf(stderr, "\t-c value\tcompression level (0 ~ 9)\n"); fprintf(stderr, "\t-t value\tnumber of threads (1 ~ 32)\n");