From patchwork Thu Jul 17 10:46:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 4574431 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 DE6BF9F37C for ; Thu, 17 Jul 2014 10:46:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1927120122 for ; Thu, 17 Jul 2014 10:46:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ABD3D2010F for ; Thu, 17 Jul 2014 10:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756538AbaGQKqs (ORCPT ); Thu, 17 Jul 2014 06:46:48 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19237 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754473AbaGQKqq (ORCPT ); Thu, 17 Jul 2014 06:46:46 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s6HAkCRa012917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Jul 2014 10:46:12 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s6HAkAeC018830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jul 2014 10:46:11 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6HAk8An001539; Thu, 17 Jul 2014 10:46:08 GMT Received: from localhost.jp.oracle.com (/10.191.15.134) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 17 Jul 2014 03:46:08 -0700 From: Liu Bo To: linux-btrfs Cc: Sebastian Ochmann Subject: [PATCH] Btrfs: fix wrong manpage of defrag command Date: Thu, 17 Jul 2014 18:46:01 +0800 Message-Id: <1405593961-10423-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 1.8.1.4 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] 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, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 'btrfs filesystem defrag' has an option '-t', whose manpage says "Any extent bigger than threshold given by -t option, will be considered already defragged. Use 0 to take the kernel default, and use 1 to say every single extent must be rewritten." Here 'use 0' still works, it refers to the default value(256K), however, 'use 1' is an obvious typo, it should be -1, which means the largest value it can be. Right now, we use parse_size() which no more allow value '-1', so in order to keep the manpage correct, this updates it to only keep value '0'. If you want to make sure every single extent is rewritten, please use a fairly large size, say 1G. Reported-by: Sebastian Ochmann Signed-off-by: Liu Bo --- Documentation/btrfs-filesystem.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/btrfs-filesystem.txt b/Documentation/btrfs-filesystem.txt index 0ee79cb..c9c0b00 100644 --- a/Documentation/btrfs-filesystem.txt +++ b/Documentation/btrfs-filesystem.txt @@ -41,8 +41,7 @@ The start position and the number of bytes to defragment can be specified by start and len using '-s' and '-l' options below. Any extent bigger than threshold given by '-t' option, will be considered already defragged. -Use 0 to take the kernel default, and use 1 to -say every single extent must be rewritten. +Use 0 to take the kernel default. You can also turn on compression in defragment operations. + `Options`