From patchwork Mon Mar 31 10:03:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 3912901 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 950D49F357 for ; Mon, 31 Mar 2014 10:07:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4C63203AB for ; Mon, 31 Mar 2014 10:07:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8836203AC for ; Mon, 31 Mar 2014 10:07:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753975AbaCaKHr (ORCPT ); Mon, 31 Mar 2014 06:07:47 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:53730 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753985AbaCaKHn (ORCPT ); Mon, 31 Mar 2014 06:07:43 -0400 X-IronPort-AV: E=Sophos;i="4.97,763,1389715200"; d="scan'208";a="9799942" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 31 Mar 2014 18:03:38 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s2VA7UTl028418 for ; Mon, 31 Mar 2014 18:07:32 +0800 Received: from localhost.localdomain ([10.167.226.111]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2014033118041584-870516 ; Mon, 31 Mar 2014 18:04:15 +0800 From: Gui Hecheng To: linux-btrfs@vger.kernel.org Cc: Gui Hecheng Subject: [PATCH] btrfs-progs: update manpage for btrfs resize support size unit t/p/e Date: Mon, 31 Mar 2014 18:03:26 +0800 Message-Id: <1396260206-14153-2-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1396260206-14153-1-git-send-email-guihc.fnst@cn.fujitsu.com> References: <1396260206-14153-1-git-send-email-guihc.fnst@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2014/03/31 18:04:15, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2014/03/31 18:04:17, Serialize complete at 2014/03/31 18:04:17 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=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 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 --- 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..3349d85 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', kilobytes, megabytes, gigabytes, +terabytes, petabytes, exabytes 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.