xfs: test inode allocations in post-growfs disk space

Make sure inodes can be allocated in new space added by xfs_growfs.

Regression test for
xfs: allow inode allocations in post-growfs disk space

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Eryu Guan
2014-08-13 11:15:23 +10:00
committed by Dave Chinner
parent 313db9fe06
commit 36e1af6a8f
4 changed files with 141 additions and 0 deletions
+33
View File
@@ -2312,6 +2312,39 @@ _require_btrfs_fs_feature()
_notrun "Feature $feat not supported by the available btrfs version"
}
_get_total_inode()
{
if [ -z "$1" ]; then
echo "Usage: _get_total_inode <mnt>"
exit 1
fi
local nr_inode;
nr_inode=`$DF_PROG -i $1 | tail -1 | awk '{print $3}'`
echo $nr_inode
}
_get_used_inode()
{
if [ -z "$1" ]; then
echo "Usage: _get_used_inode <mnt>"
exit 1
fi
local nr_inode;
nr_inode=`$DF_PROG -i $1 | tail -1 | awk '{print $4}'`
echo $nr_inode
}
_get_free_inode()
{
if [ -z "$1" ]; then
echo "Usage: _get_free_inode <mnt>"
exit 1
fi
local nr_inode;
nr_inode=`$DF_PROG -i $1 | tail -1 | awk '{print $5}'`
echo $nr_inode
}
init_rc()
{
if [ "$iam" == new ]