diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-06-27 08:04:59 +0200 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-06-28 20:00:05 +0200 |
commit | dc037ad7d24f3711e431a45c053b5d425995e9e4 (patch) | |
tree | 5a611ba5c6644992d3465d7f1b18267a9f5b43bf /fs/xfs/xfs_super.c | |
parent | xfs: Use inode create transaction (diff) | |
download | linux-dc037ad7d24f3711e431a45c053b5d425995e9e4.tar.xz linux-dc037ad7d24f3711e431a45c053b5d425995e9e4.zip |
xfs: implement inode change count
For CRC enabled filesystems, add support for the monotonic inode
version change counter that is needed by protocols like NFSv4 for
determining if the inode has changed in any way at all between two
unrelated operations on the inode.
This bumps the change count the first time an inode is dirtied in a
transaction. Since all modifications to the inode are logged, this
will catch all changes that are made to the inode, including
timestamp updates that occur during data writes.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 30ef68f8a390..e5e8b5ee8bfa 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1477,6 +1477,10 @@ xfs_fs_fill_super( sb->s_time_gran = 1; set_posix_acl_flag(sb); + /* version 5 superblocks support inode version counters. */ + if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5) + sb->s_flags |= MS_I_VERSION; + error = xfs_mountfs(mp); if (error) goto out_filestream_unmount; |