xfs
[Top] [All Lists]

Re: xfs_growfs -m

To: ASANO Masahiro <masano@xxxxxxxxxxxxxx>
Subject: Re: xfs_growfs -m
From: Steve Lord <lord@xxxxxxx>
Date: 07 Nov 2001 10:44:48 -0600
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20011107211320I.masano@xxxxxxxxxxxxxx>
References: <20011107211320I.masano@xxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
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


<Prev in Thread] Current Thread [Next in Thread>
  • xfs_growfs -m, ASANO Masahiro
    • Re: xfs_growfs -m, Steve Lord <=