Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: add the inode directory type support to XFS_IOC_FSGEOM

Add the inode type directory type support to XFS_IOC_FSGEOM
so that xfs_repair/xfs_info knows if the superblock v4 filesystem
enabled the feature.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>

authored by

Mark Tinguely and committed by
Ben Myers
2900a579 d948709b

+5 -3
+2 -2
fs/xfs/xfs_fs.h
··· 233 233 #define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */ 234 234 #define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */ 235 235 #define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework */ 236 - #define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */ 236 + #define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */ 237 237 #define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */ 238 238 #define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters */ 239 239 #define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */ 240 - 240 + #define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */ 241 241 242 242 /* 243 243 * Minimum and maximum sizes need for growth checks.
+3 -1
fs/xfs/xfs_fsops.c
··· 101 101 (xfs_sb_version_hasprojid32bit(&mp->m_sb) ? 102 102 XFS_FSOP_GEOM_FLAGS_PROJID32 : 0) | 103 103 (xfs_sb_version_hascrc(&mp->m_sb) ? 104 - XFS_FSOP_GEOM_FLAGS_V5SB : 0); 104 + XFS_FSOP_GEOM_FLAGS_V5SB : 0) | 105 + (xfs_sb_version_hasftype(&mp->m_sb) ? 106 + XFS_FSOP_GEOM_FLAGS_FTYPE : 0); 105 107 geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ? 106 108 mp->m_sb.sb_logsectsize : BBSIZE; 107 109 geo->rtsectsize = mp->m_sb.sb_blocksize;