From patchwork Tue Apr 1 10:01:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 3919881 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 C29EFBF540 for ; Tue, 1 Apr 2014 10:05:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D66DA203AE for ; Tue, 1 Apr 2014 10:05:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 021B720380 for ; Tue, 1 Apr 2014 10:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171AbaDAKFT (ORCPT ); Tue, 1 Apr 2014 06:05:19 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:10173 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751057AbaDAKFS (ORCPT ); Tue, 1 Apr 2014 06:05:18 -0400 X-IronPort-AV: E=Sophos;i="4.97,770,1389715200"; d="scan'208";a="28719838" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Apr 2014 18:02:47 +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 s31A5Al3012582 for ; Tue, 1 Apr 2014 18:05:10 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.146.2; Tue, 1 Apr 2014 18:05:14 +0800 From: Gui Hecheng To: CC: Gui Hecheng Subject: [PATCH v2] btrfs-progs: update manpage for btrfs resize support size unit t/p/e Date: Tue, 1 Apr 2014 18:01:10 +0800 Message-ID: <1396346470-2832-1-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 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.5 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 btrfs resize now support size unit parse of k/m/g/t/p/e in kernel space, adopt the changes in userspace manpage. Signed-off-by: Gui Hecheng --- changelog v1->v2: replace kilobyte with kibibyte, and others --- cmds-filesystem.c | 3 ++- man/btrfs.8.in | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 7eb6e9d..b81768b 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -922,10 +922,11 @@ static int cmd_defrag(int argc, char **argv) } static const char * const cmd_resize_usage[] = { - "btrfs filesystem resize [devid:][+/-][gkm]|[devid:]max ", + "btrfs filesystem resize [devid:][+/-][kKmMgGtTpPeE]|[devid:]max ", "Resize a filesystem", "If 'max' is passed, the filesystem will occupy all available space", "on the device 'devid'.", + "[kK] means KiB, which denotes 1KiB = 1024B, 1MiB = 1024KiB, etc.", NULL }; diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 7fbde82..9fad64a 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -31,7 +31,7 @@ btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBfilesystem defragment\fP [\fIoptions\fP] \fI\fP|\fI\fP [\fI\fP|\fI...\fP]\fP .PP -\fBbtrfs\fP \fBfilesystem resize\fP [\fIdevid\fP:][+/\-]\fI\fP[gkm]|[\fIdevid\fP:]\fImax \fP +\fBbtrfs\fP \fBfilesystem resize\fP [\fIdevid\fP:][+/\-]\fI\fP[kKmMgGtTpPeE]|[\fIdevid\fP:]\fImax \fP .PP \fBbtrfs\fP \fBfilesystem label\fP [\fI\fP|\fI\fP] [\fI\fP] .PP @@ -343,7 +343,7 @@ copies with \fBcp --reflink\fP. .\" .\" Some wording are extracted by the resize2fs man page .\" -\fBfilesystem resize\fP [\fIdevid\fP:][+/\-]\fI\fP[gkm]|[\fIdevid\fP:]\fImax \fR +\fBfilesystem resize\fP [\fIdevid\fP:][+/\-]\fI\fP[kKmMgGtTpPeE]|[\fIdevid\fP:]\fImax \fR Resize a filesystem identified by \fI\fR for the underlying device \fIdevid\fR. The \fIdevid\fR can be found with \fBbtrfs filesystem show\fR and defaults to 1 if not specified. @@ -352,8 +352,9 @@ If the prefix \fI+\fR or \fI\-\fR is present the size is increased or decreased by the quantity \fI\fR. If no units are specified, the unit of the \fI\fR parameter defaults to bytes. Optionally, the size parameter may be suffixed by one of the following -units designators: 'K', 'M', or 'G', kilobytes, megabytes, or gigabytes, -respectively. +units designators: 'K', 'M', 'G', 'T', 'P', 'E', kibibytes, mebibytes, gibibytes, +tebibytes, pebibytes, exbibytes respectively. +K means KiB, which denotes 1KiB = 1024B, 1MiB = 1024KiB, etc.. If 'max' is passed, the filesystem will occupy all available space on the device \fIdevid\fR.