]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
db: show sparse inodes feature state in version command output
authorBrian Foster <bfoster@redhat.com>
Thu, 30 Jul 2015 23:18:07 +0000 (09:18 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 30 Jul 2015 23:18:07 +0000 (09:18 +1000)
The xfs_db version command prints a string for each of the various
features supported by a filesystem. Include 'SPARSE_INODES' in the
version string when sparse inode chunk allocation is supported by the
fs.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/sb.c

diff --git a/db/sb.c b/db/sb.c
index d8be938c3cd4be3d0e18acc4e03974945ee82b66..b36680bef3abdfe6f942e7df7c7ce1c3cee3933c 100644 (file)
--- a/db/sb.c
+++ b/db/sb.c
@@ -650,6 +650,8 @@ version_string(
                strcat(s, ",FTYPE");
        if (xfs_sb_version_hasfinobt(sbp))
                strcat(s, ",FINOBT");
+       if (xfs_sb_version_hassparseinodes(sbp))
+               strcat(s, ",SPARSE_INODES");
        return s;
 }