|
@@ -112,6 +112,17 @@ xfs_trans_log_inode(
|
|
|
ASSERT(ip->i_itemp != NULL);
|
|
|
ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
|
|
|
|
|
|
+ /*
|
|
|
+ * First time we log the inode in a transaction, bump the inode change
|
|
|
+ * counter if it is configured for this to occur.
|
|
|
+ */
|
|
|
+ if (!(ip->i_itemp->ili_item.li_desc->lid_flags & XFS_LID_DIRTY) &&
|
|
|
+ IS_I_VERSION(VFS_I(ip))) {
|
|
|
+ inode_inc_iversion(VFS_I(ip));
|
|
|
+ ip->i_d.di_changecount = VFS_I(ip)->i_version;
|
|
|
+ flags |= XFS_ILOG_CORE;
|
|
|
+ }
|
|
|
+
|
|
|
tp->t_flags |= XFS_TRANS_DIRTY;
|
|
|
ip->i_itemp->ili_item.li_desc->lid_flags |= XFS_LID_DIRTY;
|
|
|
|