diff mbox series

[1/4] xfs_quota: document unit multipliers used in limit command

Message ID 1639167697-15392-2-git-send-email-sandeen@sandeen.net (mailing list archive)
State New, archived
Headers show
Series xfsprogs: misc small fixes | expand

Commit Message

Eric Sandeen Dec. 10, 2021, 8:21 p.m. UTC
From: Eric Sandeen <sandeen@redhat.com>

The units used to set limits are never specified in the xfs_quota
man page, and in fact for block limits, the standard k/m/g/...
units are accepted. Document all of this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
 man/man8/xfs_quota.8 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Darrick J. Wong Dec. 11, 2021, 12:15 a.m. UTC | #1
On Fri, Dec 10, 2021 at 02:21:34PM -0600, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
> 
> The units used to set limits are never specified in the xfs_quota
> man page, and in fact for block limits, the standard k/m/g/...
> units are accepted. Document all of this.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> ---
>  man/man8/xfs_quota.8 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8
> index 59e603f..f841e3f 100644
> --- a/man/man8/xfs_quota.8
> +++ b/man/man8/xfs_quota.8
> @@ -446,7 +446,13 @@ option reports state on all filesystems and not just the current path.
>  .I name
>  .br
>  Set quota block limits (bhard/bsoft), inode count limits (ihard/isoft)
> -and/or realtime block limits (rtbhard/rtbsoft). The
> +and/or realtime block limits (rtbhard/rtbsoft) to N, where N is a bare

What is a 'bare' number?

How about (shortened so I don't have to retype the whole thing):

"Set quota block limits...to N.  For block limits, N is a number
with a s/b/k/m/g/t/p/e multiplication suffix..."

"For inode limits, N is a bare number; no suffixes are allowed."

?

--D

> +number representing bytes or inodes.
> +For block limits, a number with a s/b/k/m/g/t/p/e multiplication suffix
> +as described in
> +.BR mkfs.xfs (8)
> +is also accepted.
> +The
>  .B \-d
>  option (defaults) can be used to set the default value
>  that will be used, otherwise a specific
> -- 
> 1.8.3.1
>
Eric Sandeen Dec. 11, 2021, 5:47 a.m. UTC | #2
On 12/10/21 6:15 PM, Darrick J. Wong wrote:
> On Fri, Dec 10, 2021 at 02:21:34PM -0600, Eric Sandeen wrote:
>> From: Eric Sandeen <sandeen@redhat.com>
>>
>> The units used to set limits are never specified in the xfs_quota
>> man page, and in fact for block limits, the standard k/m/g/...
>> units are accepted. Document all of this.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
>> ---
>>   man/man8/xfs_quota.8 | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8
>> index 59e603f..f841e3f 100644
>> --- a/man/man8/xfs_quota.8
>> +++ b/man/man8/xfs_quota.8
>> @@ -446,7 +446,13 @@ option reports state on all filesystems and not just the current path.
>>   .I name
>>   .br
>>   Set quota block limits (bhard/bsoft), inode count limits (ihard/isoft)
>> -and/or realtime block limits (rtbhard/rtbsoft). The
>> +and/or realtime block limits (rtbhard/rtbsoft) to N, where N is a bare
> 
> What is a 'bare' number?
> 
> How about (shortened so I don't have to retype the whole thing):
> 
> "Set quota block limits...to N.  For block limits, N is a number
> with a s/b/k/m/g/t/p/e multiplication suffix..."

it's also allowed w/o the suffix. so I propose ...

Set quota block limits (bhard/bsoft), inode count limits (ihard/isoft)
+and/or realtime block limits (rtbhard/rtbsoft) to N, where N is a
number representing bytes or inodes.
+For block limits, a number with a s/b/k/m/g/t/p/e multiplication suffix
+as described in
+.BR mkfs.xfs (8)
+is also accepted.
For inode limits, no suffixes are allowed.

(I thought about adding suffix support to inodes but meh, that's confusing,
what is 1 block's worth of inodes?)

> 
> "For inode limits, N is a bare number; no suffixes are allowed."
> 
> ?
> 
> --D
> 
>> +number representing bytes or inodes.
>> +For block limits, a number with a s/b/k/m/g/t/p/e multiplication suffix
>> +as described in
>> +.BR mkfs.xfs (8)
>> +is also accepted.
>> +The
>>   .B \-d
>>   option (defaults) can be used to set the default value
>>   that will be used, otherwise a specific
>> -- 
>> 1.8.3.1
>>
>
Darrick J. Wong Dec. 11, 2021, 4:55 p.m. UTC | #3
On Fri, Dec 10, 2021 at 11:47:07PM -0600, Eric Sandeen wrote:
> On 12/10/21 6:15 PM, Darrick J. Wong wrote:
> > On Fri, Dec 10, 2021 at 02:21:34PM -0600, Eric Sandeen wrote:
> > > From: Eric Sandeen <sandeen@redhat.com>
> > > 
> > > The units used to set limits are never specified in the xfs_quota
> > > man page, and in fact for block limits, the standard k/m/g/...
> > > units are accepted. Document all of this.
> > > 
> > > Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> > > Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> > > ---
> > >   man/man8/xfs_quota.8 | 8 +++++++-
> > >   1 file changed, 7 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8
> > > index 59e603f..f841e3f 100644
> > > --- a/man/man8/xfs_quota.8
> > > +++ b/man/man8/xfs_quota.8
> > > @@ -446,7 +446,13 @@ option reports state on all filesystems and not just the current path.
> > >   .I name
> > >   .br
> > >   Set quota block limits (bhard/bsoft), inode count limits (ihard/isoft)
> > > -and/or realtime block limits (rtbhard/rtbsoft). The
> > > +and/or realtime block limits (rtbhard/rtbsoft) to N, where N is a bare
> > 
> > What is a 'bare' number?
> > 
> > How about (shortened so I don't have to retype the whole thing):
> > 
> > "Set quota block limits...to N.  For block limits, N is a number
> > with a s/b/k/m/g/t/p/e multiplication suffix..."
> 
> it's also allowed w/o the suffix. so I propose ...
> 
> Set quota block limits (bhard/bsoft), inode count limits (ihard/isoft)
> +and/or realtime block limits (rtbhard/rtbsoft) to N, where N is a
> number representing bytes or inodes.
> +For block limits, a number with a s/b/k/m/g/t/p/e multiplication suffix
> +as described in
> +.BR mkfs.xfs (8)
> +is also accepted.
> For inode limits, no suffixes are allowed.
> 
> (I thought about adding suffix support to inodes but meh, that's confusing,
> what is 1 block's worth of inodes?)

...or does "1g" refer to one giga-inode, or one gibi-inode?
Probably best to leave the code as it is.

As for the manpage update, with the new wording,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> 
> > 
> > "For inode limits, N is a bare number; no suffixes are allowed."
> > 
> > ?
> > 
> > --D
> > 
> > > +number representing bytes or inodes.
> > > +For block limits, a number with a s/b/k/m/g/t/p/e multiplication suffix
> > > +as described in
> > > +.BR mkfs.xfs (8)
> > > +is also accepted.
> > > +The
> > >   .B \-d
> > >   option (defaults) can be used to set the default value
> > >   that will be used, otherwise a specific
> > > -- 
> > > 1.8.3.1
> > > 
> >
diff mbox series

Patch

diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8
index 59e603f..f841e3f 100644
--- a/man/man8/xfs_quota.8
+++ b/man/man8/xfs_quota.8
@@ -446,7 +446,13 @@  option reports state on all filesystems and not just the current path.
 .I name
 .br
 Set quota block limits (bhard/bsoft), inode count limits (ihard/isoft)
-and/or realtime block limits (rtbhard/rtbsoft). The
+and/or realtime block limits (rtbhard/rtbsoft) to N, where N is a bare
+number representing bytes or inodes.
+For block limits, a number with a s/b/k/m/g/t/p/e multiplication suffix
+as described in
+.BR mkfs.xfs (8)
+is also accepted.
+The
 .B \-d
 option (defaults) can be used to set the default value
 that will be used, otherwise a specific