xfs
[Top] [All Lists]

[PATCH v3 10/11] xfs: report finobt status in fs geometry

To: xfs@xxxxxxxxxxx
Subject: [PATCH v3 10/11] xfs: report finobt status in fs geometry
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Tue, 4 Feb 2014 12:49:41 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1391536182-9048-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1391536182-9048-1-git-send-email-bfoster@xxxxxxxxxx>
Define the XFS_FSOP_GEOM_FLAGS_FINOBT fs geometry flag and set the
associated bit if the filesystem supports the free inode btree.

Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
---
 fs/xfs/xfs_fs.h    | 1 +
 fs/xfs/xfs_fsops.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index c5fc116..d34703d 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -238,6 +238,7 @@ typedef struct xfs_fsop_resblks {
 #define XFS_FSOP_GEOM_FLAGS_LAZYSB     0x4000  /* lazy superblock counters */
 #define XFS_FSOP_GEOM_FLAGS_V5SB       0x8000  /* version 5 superblock */
 #define XFS_FSOP_GEOM_FLAGS_FTYPE      0x10000 /* inode directory types */
+#define XFS_FSOP_GEOM_FLAGS_FINOBT     0x20000 /* free inode btree */
 
 /*
  * Minimum and maximum sizes need for growth checks.
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 96e4eb0..3445ead 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -104,7 +104,9 @@ xfs_fs_geometry(
                        (xfs_sb_version_hascrc(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_V5SB : 0) |
                        (xfs_sb_version_hasftype(&mp->m_sb) ?
-                               XFS_FSOP_GEOM_FLAGS_FTYPE : 0);
+                               XFS_FSOP_GEOM_FLAGS_FTYPE : 0) |
+                       (xfs_sb_version_hasfinobt(&mp->m_sb) ?
+                               XFS_FSOP_GEOM_FLAGS_FINOBT : 0);
                geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
                                mp->m_sb.sb_logsectsize : BBSIZE;
                geo->rtsectsize = mp->m_sb.sb_blocksize;
-- 
1.8.1.4

<Prev in Thread] Current Thread [Next in Thread>