All the xfs_growfs -m is doing is reducing the allowed number of inodes
in the filesystem, this is stored in the superblock as a percentage of
disk space I think.
On the last execution here you dropped the percentage of inodes below
the actual number of inodes allocated, I suspect this is a case the
original implementer of this code did not think of. The correct
semantics could be to refuse the call since there are already more
inodes than this, or to fix up the information being used by df to
report a more sane value.
XFS never frees space allocated to inodes, once you have allocated
space as inodes, it is never returned to free space, just to
free inodes. So, if you create a million files and then remove them
all, there are still a million inodes out there on the filesystem
waiting to be reused. xfs_growfs -m has no interaction with the
number of inodes actually in existance, just on the allowed high
water mark of inodes.
Steve
On Wed, 2001-11-07 at 06:13, ASANO Masahiro wrote:
> May I reduce the maximum percentage of inodes with "xfs_growfs -m" ?
>
> `df' showed an negative value:
>
> $ df -i /mnt/masano1
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda7 13216 9472 3744 72% /mnt/masano1
> # xfs_growfs -m 5 /mnt/masano1
> ...
> inode max percent changed from 25 to 5
> $ df -i /mnt/masano1
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda7 13216 9472 3744 72% /mnt/masano1
> # xfs_growfs -m 3 /mnt/masano1
> ...
> inode max percent changed from 5 to 3
> $ df -i /mnt/masano1
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda7 13216 9472 3744 72% /mnt/masano1
> # xfs_growfs -m 2 /mnt/masano1
> ...
> inode max percent changed from 3 to 2
> $ df -i /mnt/masano1
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda7 10912 9472 1440 87% /mnt/masano1
> # xfs_growfs -m 1 /mnt/masano1
> ...
> inode max percent changed from 2 to 1
> $ df -i /mnt/masano1
> Filesystem Inodes IUsed IFree IUse% Mounted on
> /dev/sda7 5456 -18446744069414593792 4294963280 101%
> /mnt/masano1
>
>
> And if I had allocated a large number of inodes and removed them previously,
> I could allocate inodes over the maximum percentage after reducing it.
> I wonder why.
>
> Any comments and suggestions are welcome.
>
> Environment: Red Hat 7.1 (fileutils-4.0.36-4) + XFS (CVS tree 2001-11-06)
>
> Cheers
> --
> masano
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: lord@xxxxxxx
|