From patchwork Thu Jul 31 01:29:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4652801 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 DA6899F36A for ; Thu, 31 Jul 2014 01:36:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04393201B4 for ; Thu, 31 Jul 2014 01:36:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F277D2018E for ; Thu, 31 Jul 2014 01:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755348AbaGaBgA (ORCPT ); Wed, 30 Jul 2014 21:36:00 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:10115 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752518AbaGaBf7 (ORCPT ); Wed, 30 Jul 2014 21:35:59 -0400 X-IronPort-AV: E=Sophos;i="5.00,999,1396972800"; d="scan'208";a="33991798" Received: from localhost (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 31 Jul 2014 09:33:10 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s6V1Zs1K001700; Thu, 31 Jul 2014 09:35:54 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 31 Jul 2014 09:36:06 +0800 From: Gui Hecheng To: CC: , , <1i5t5.duncan@cox.net>, Gui Hecheng Subject: [PATCH v3] btrfs-progs: correct manpage option description for scrub Date: Thu, 31 Jul 2014 09:29:57 +0800 Message-ID: <1406770197-4508-1-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The -f option of scrub means to "force starting new scrub even if a scrub is already running" *not* "force to check whether scrub has started or resumed in userspace" as described originally. So replace the orignal description in the manpage and code. Also, add description of the potential failure as follows "If a scrub is already running, it fails." Signed-off-by: Gui Hecheng Signed-off-by: Satoru Takeuchi Cc: David Sterba --- changelog v1->v2: adopt more precise expression of the checking behavior add description of potential failure v2->v3: remove duplicate word in description --- Documentation/btrfs-scrub.txt | 6 +++--- cmds-scrub.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/btrfs-scrub.txt b/Documentation/btrfs-scrub.txt index 7b27d63..b8d3b65 100644 --- a/Documentation/btrfs-scrub.txt +++ b/Documentation/btrfs-scrub.txt @@ -18,7 +18,7 @@ SUBCOMMAND ---------- *start* [-BdqrRf] [-c -n ] |:: Start a scrub on all devices of the filesystem identified by or on -a single . +a single . If a scrub is already running, the new one fails. + Without options, scrub is started as a background process. Progress can be obtained with the *scrub status* command. Scrubbing @@ -47,8 +47,8 @@ manpage). -n :::: Set IO priority classdata (see `ionice`(1) manpage). -f:::: -force to check whether scrub has started or resumed in userspace. -this is useful when scrub stat record file is damaged. +Force starting new scrub even if a scrub is already running. +This is useful when scrub stat record file is damaged. *cancel* |:: If a scrub is running on the filesystem identified by , cancel it. diff --git a/cmds-scrub.c b/cmds-scrub.c index 03eb9ba..8c3d61c 100644 --- a/cmds-scrub.c +++ b/cmds-scrub.c @@ -1529,7 +1529,7 @@ out: static const char * const cmd_scrub_start_usage[] = { "btrfs scrub start [-BdqrRf] [-c ioprio_class -n ioprio_classdata] |", - "Start a new scrub", + "Start a new scrub. If a scrub is already running, the new one fails.", "", "-B do not background", "-d stats per device (-B only)", @@ -1538,7 +1538,7 @@ static const char * const cmd_scrub_start_usage[] = { "-R raw print mode, print full data instead of summary" "-c set ioprio class (see ionice(1) manpage)", "-n set ioprio classdata (see ionice(1) manpage)", - "-f force to skip checking whether scrub has started/resumed in userspace ", + "-f force starting new scrub even if a scrub is already running.", " this is useful when scrub stats record file is damaged", NULL };