[PATCH 23/23] xfs: make XFS_SB_FEAT_INCOMPAT_LOG_EXCHMAPS sticky for parent pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Directory parent pointers make directory repairs practical.  However,
online repairs of directories (and parent pointers which are embedded in
extended attributes) must commit the repairs atomically by building a
replacement structure in a temporary file and then exchanging the
contents.

Although there's no hard dependency between parent pointers and file
mapping exchanges like there is with logged xattr updates, these two
features will likely go hand in hand.  Make sure we always have the
exchmaps bit turned on.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 fs/xfs/xfs_mount.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)


diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 62351fdde2c80..348aa9e9d439a 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -635,6 +635,20 @@ xfs_mountfs_set_perm_log_features(
 		 * updates.  Set the LARP bit.
 		 */
 		mp->m_perm_log_incompat |= XFS_SB_FEAT_INCOMPAT_LOG_XATTRS;
+
+		/*
+		 * Directory parent pointers make directory repairs practical.
+		 * However, online repairs of directories (and parent pointers
+		 * which are embedded in extended attributes) must commit the
+		 * repairs atomically by building a replacement structure in a
+		 * temporary file and then exchanging the contents.
+		 *
+		 * Although there's no hard dependency between parent pointers
+		 * and file mapping exchanges like there is with logged xattr
+		 * updates, these two features will likely go hand in hand.
+		 * Set the exchmaps bit.
+		 */
+		mp->m_perm_log_incompat |= XFS_SB_FEAT_INCOMPAT_LOG_EXCHMAPS;
 	}
 
 	/* Make sure the permanent bits are set in the ondisk primary super. */





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux