mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	xfs: add a incompat feature bit for parent pointers
Create an incompat feature bit and a fs geometry flag so that we can enable the feature in the ondisk superblock and advertise its existence to userspace. Signed-off-by: Mark Tinguely <mark.tinguely@oracle.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
		
							parent
							
								
									7dafb449b7
								
							
						
					
					
						commit
						5f98ec1cb5
					
				
					 4 changed files with 10 additions and 0 deletions
				
			
		|  | @ -374,6 +374,7 @@ xfs_sb_has_ro_compat_feature( | ||||||
| #define XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR (1 << 4) /* needs xfs_repair */ | #define XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR (1 << 4) /* needs xfs_repair */ | ||||||
| #define XFS_SB_FEAT_INCOMPAT_NREXT64	(1 << 5)  /* large extent counters */ | #define XFS_SB_FEAT_INCOMPAT_NREXT64	(1 << 5)  /* large extent counters */ | ||||||
| #define XFS_SB_FEAT_INCOMPAT_EXCHRANGE	(1 << 6)  /* exchangerange supported */ | #define XFS_SB_FEAT_INCOMPAT_EXCHRANGE	(1 << 6)  /* exchangerange supported */ | ||||||
|  | #define XFS_SB_FEAT_INCOMPAT_PARENT	(1 << 7)  /* parent pointers */ | ||||||
| #define XFS_SB_FEAT_INCOMPAT_ALL \ | #define XFS_SB_FEAT_INCOMPAT_ALL \ | ||||||
| 		(XFS_SB_FEAT_INCOMPAT_FTYPE | \ | 		(XFS_SB_FEAT_INCOMPAT_FTYPE | \ | ||||||
| 		 XFS_SB_FEAT_INCOMPAT_SPINODES | \ | 		 XFS_SB_FEAT_INCOMPAT_SPINODES | \ | ||||||
|  |  | ||||||
|  | @ -240,6 +240,7 @@ typedef struct xfs_fsop_resblks { | ||||||
| #define XFS_FSOP_GEOM_FLAGS_INOBTCNT	(1 << 22) /* inobt btree counter */ | #define XFS_FSOP_GEOM_FLAGS_INOBTCNT	(1 << 22) /* inobt btree counter */ | ||||||
| #define XFS_FSOP_GEOM_FLAGS_NREXT64	(1 << 23) /* large extent counters */ | #define XFS_FSOP_GEOM_FLAGS_NREXT64	(1 << 23) /* large extent counters */ | ||||||
| #define XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE (1 << 24) /* exchange range */ | #define XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE (1 << 24) /* exchange range */ | ||||||
|  | #define XFS_FSOP_GEOM_FLAGS_PARENT	(1 << 25) /* linux parent pointers */ | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Minimum and maximum sizes need for growth checks. |  * Minimum and maximum sizes need for growth checks. | ||||||
|  |  | ||||||
|  | @ -178,6 +178,8 @@ xfs_sb_version_to_features( | ||||||
| 		features |= XFS_FEAT_NREXT64; | 		features |= XFS_FEAT_NREXT64; | ||||||
| 	if (sbp->sb_features_incompat & XFS_SB_FEAT_INCOMPAT_EXCHRANGE) | 	if (sbp->sb_features_incompat & XFS_SB_FEAT_INCOMPAT_EXCHRANGE) | ||||||
| 		features |= XFS_FEAT_EXCHANGE_RANGE; | 		features |= XFS_FEAT_EXCHANGE_RANGE; | ||||||
|  | 	if (sbp->sb_features_incompat & XFS_SB_FEAT_INCOMPAT_PARENT) | ||||||
|  | 		features |= XFS_FEAT_PARENT; | ||||||
| 
 | 
 | ||||||
| 	return features; | 	return features; | ||||||
| } | } | ||||||
|  | @ -1254,6 +1256,8 @@ xfs_fs_geometry( | ||||||
| 		geo->flags |= XFS_FSOP_GEOM_FLAGS_BIGTIME; | 		geo->flags |= XFS_FSOP_GEOM_FLAGS_BIGTIME; | ||||||
| 	if (xfs_has_inobtcounts(mp)) | 	if (xfs_has_inobtcounts(mp)) | ||||||
| 		geo->flags |= XFS_FSOP_GEOM_FLAGS_INOBTCNT; | 		geo->flags |= XFS_FSOP_GEOM_FLAGS_INOBTCNT; | ||||||
|  | 	if (xfs_has_parent(mp)) | ||||||
|  | 		geo->flags |= XFS_FSOP_GEOM_FLAGS_PARENT; | ||||||
| 	if (xfs_has_sector(mp)) { | 	if (xfs_has_sector(mp)) { | ||||||
| 		geo->flags |= XFS_FSOP_GEOM_FLAGS_SECTOR; | 		geo->flags |= XFS_FSOP_GEOM_FLAGS_SECTOR; | ||||||
| 		geo->logsectsize = sbp->sb_logsectsize; | 		geo->logsectsize = sbp->sb_logsectsize; | ||||||
|  |  | ||||||
|  | @ -1746,6 +1746,10 @@ xfs_fs_fill_super( | ||||||
| 		xfs_warn(mp, | 		xfs_warn(mp, | ||||||
| 	"EXPERIMENTAL exchange-range feature enabled. Use at your own risk!"); | 	"EXPERIMENTAL exchange-range feature enabled. Use at your own risk!"); | ||||||
| 
 | 
 | ||||||
|  | 	if (xfs_has_parent(mp)) | ||||||
|  | 		xfs_warn(mp, | ||||||
|  | 	"EXPERIMENTAL parent pointer feature enabled. Use at your own risk!"); | ||||||
|  | 
 | ||||||
| 	error = xfs_mountfs(mp); | 	error = xfs_mountfs(mp); | ||||||
| 	if (error) | 	if (error) | ||||||
| 		goto out_filestream_unmount; | 		goto out_filestream_unmount; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Allison Henderson
						Allison Henderson