From patchwork Wed Jul 30 07:32:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4646201 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1652DC0338 for ; Wed, 30 Jul 2014 07:38:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F13CC20123 for ; Wed, 30 Jul 2014 07:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 115A42010B for ; Wed, 30 Jul 2014 07:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755002AbaG3HiE (ORCPT ); Wed, 30 Jul 2014 03:38:04 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:8420 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754885AbaG3HiD (ORCPT ); Wed, 30 Jul 2014 03:38:03 -0400 X-IronPort-AV: E=Sophos;i="5.00,993,1396972800"; d="scan'208";a="33952193" Received: from localhost (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 30 Jul 2014 15:35:13 +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 s6U7bxRp025091; Wed, 30 Jul 2014 15:37:59 +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; Wed, 30 Jul 2014 15:38:09 +0800 From: Gui Hecheng To: CC: , , Gui Hecheng Subject: [PATCH v2] btrfs-progs: correct manpage option description for scrub Date: Wed, 30 Jul 2014 15:32:05 +0800 Message-ID: <1406705525-349-1-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <53D88C08.6050704@jp.fujitsu.com> References: <53D88C08.6050704@jp.fujitsu.com> 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 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 --- 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 };