From patchwork Thu Jun 15 20:36:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9790201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2706C60325 for ; Thu, 15 Jun 2017 20:37:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18EB9283AD for ; Thu, 15 Jun 2017 20:37:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DDD1285A8; Thu, 15 Jun 2017 20:37:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7590A283AD for ; Thu, 15 Jun 2017 20:37:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbdFOUhD (ORCPT ); Thu, 15 Jun 2017 16:37:03 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33343 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbdFOUhC (ORCPT ); Thu, 15 Jun 2017 16:37:02 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5FKaxTA027830 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Jun 2017 20:36:59 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v5FKawFw004997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Jun 2017 20:36:58 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v5FKawGU026312; Thu, 15 Jun 2017 20:36:58 GMT Received: from localhost (/10.145.178.27) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 15 Jun 2017 13:36:58 -0700 Subject: [PATCH 11/12] xfs_spaceman: add a man page From: "Darrick J. Wong" To: sandeen@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Thu, 15 Jun 2017 13:36:57 -0700 Message-ID: <149755901707.3625.18353309221066084398.stgit@birch.djwong.org> In-Reply-To: <149755894900.3625.8076720525369136771.stgit@birch.djwong.org> References: <149755894900.3625.8076720525369136771.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Add a manual page describing xfs_spaceman's behavior. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- man/man8/xfs_spaceman.8 | 171 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 man/man8/xfs_spaceman.8 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/man/man8/xfs_spaceman.8 b/man/man8/xfs_spaceman.8 new file mode 100644 index 0000000..f064360 --- /dev/null +++ b/man/man8/xfs_spaceman.8 @@ -0,0 +1,171 @@ +.TH xfs_spaceman 8 +.SH NAME +xfs_spaceman \- show free space information about an XFS filesystem +.SH SYNOPSIS +.B xfs_spaceman +[ +.B \-c +.I cmd +] +.I file +.br +.B xfs_spaceman \-V +.SH DESCRIPTION +.B xfs_spaceman +reports and controls free space usage in an XFS filesystem. +.SH OPTIONS +.TP 1.0i +.BI \-c " cmd" +.B xfs_spaceman +commands may be run interactively (the default) or as arguments on +the command line. Multiple +.B \-c +arguments may be given. The commands are run in the sequence given, +then the program exits. + +.SH COMMANDS +.TP +.BI "freesp [ \-drs ] [-a agno] [ \-b | \-e bsize | \-h bsize | \-m factor ]" +With no arguments, +.B freesp +shows a histogram of all free space extents in the filesystem. +The command takes the following options: + +.RS 1.0i +.PD 0 +.TP 0.4i +.B \-a agno +Collect free space information from this allocation group. +This option can be specified multiple times to collect from multiple groups. + +.TP +.B \-b +This argument establishes that the histogram bin sizes are successive powers of two. +This is the default, and is mutually exclusive with the +.BR "-e" ", " "-h" ", and " "-m" " options." + +.TP +.B \-d +Print debugging information such as the raw free space extent information. + +.TP +.B \-e bsize +Set all histogram bin sizes to a specific value. +This option is mutually exclusive with the +.BR "-b" ", " "-h" ", and " "-m" " options." + +.TP +.B \-h bsize +Create a histogram bin with a lower bound of this value. +The upper bound of this bin will be one less than the lower bound of the +next highest histogram bin. +This option can be given multiple times to control the exact bin sizes. +This option is mutually exclusive with the +.BR "-b" ", " "-e" ", and " "-m" " options." + +.TP +.B \-m factor +Create each histogram bin with a size that is this many times the size +of the prvious bin created. +This option is mutually exclusive with the +.BR "-b" ", " "-e" ", and " "-h" " options." + +.TP +.B \-r +Query the realtime device for free space information. + +.TP +.B \-s +Display a summary of the free space information found. +.PD +.RE +.TP +.BR "help [ " command " ]" +Display a brief description of one or all commands. +.TP +.BI "prealloc [ \-u id ] [ \-g id ] [ -p id ] [ \-m minlen ] [ \-s ]" +Controls speculative preallocation. +If no +.BR "-u" ", " "-g" ", or " "-p" +options are given, this command acts on all files. +The command takes the following options: + +.RS 1.0i +.PD 0 +.TP 0.4i +.B \-u uid +Clear all speculative preallocations for files with this user id. +This option can be given in combination with the +.B "-g" " and " "-p" +options. + +.TP +.B \-g gid +Clear all speculative preallocations for files with this group id. +This option can be given in combination with the +.B "-u" " and " "-p" +options. + +.TP +.B \-p pid +Clear all speculative preallocations for files with this project id. +This option can be given in combination with the +.B "-u" " and " "-g" +options. + +.TP +.B \-m minlen +Ignore all files smaller than this size. +Units can be supplied for this argument. + +.TP +.B \-s +Flush all dirty data and metadata to disk. +.PD +.RE +.TP +.B print +Display a list of all open files. +.TP +.B quit +Exit +.BR xfs_spaceman . +.TP +.BI "trim ( \-a agno | \-f | " "offset" " " "length" " ) [ -m minlen ]" +Instructs the underlying storage device to release all storage that may +be backing free space in the filesystem. +The command takes the following options: + +.RS 1.0i +.PD 0 +.TP 0.4i +.B \-a agno +Trim free space extents in the given allocation group. +This option is mutually exclusive with the +.BR "-f" " option and the " +.IR "offset" "/" "length" " options." + +.TP +.B \-f +Trim all free space in the filesystem. +This option is mutually exclusive with the +.BR "-a" " option and the " +.IR "offset" "/" "length" " options." + +.TP +.IR "option" ", " "length" +Trim all free space within the physical range defined by the +.I offset +and +.I length +from this filesystem. +Units can be appended to these arguments. +This option is mutually exclusive with the +.BR "-a" " and " "-f" " options." + +.TP +.B \-m minlen +Do not trim free space extents shorter than this length. +Units can be appended to this argument. +.PD +.RE