xfs: test inode allocations in post-growfs disk space
[xfstests-dev.git] / common / rc
index 6a0272c88139f873be4d6987ef53e2fd654f7612..b831d82d64e86c0383b993c6df2472d084eb9318 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -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 ]