]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
db: show sparse inodes feature state in version command output
authorBrian Foster <bfoster@redhat.com>
Tue, 23 Jun 2015 05:08:47 +0000 (15:08 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 23 Jun 2015 05:08:47 +0000 (15:08 +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 3bbd169f7b5e2afbc274e171db70cbe31b6205b1..0e15d40cb567a77044352b9f8bdbd31a8a985111 100644 (file)
--- a/db/sb.c
+++ b/db/sb.c
@@ -663,6 +663,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;
 }