diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-07-21 02:16:15 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:59:39 -0400 |
commit | f13fae2d2a9372a5155d20bc9da4c14f02193277 (patch) | |
tree | 19bca1e8b3d5034ff84ad19e6a7640216ed3afaf /fs/xfs/linux-2.6/xfs_ioctl.c | |
parent | 0f285c8a1c4cacfd9f2aec077b06e2b537ee57ab (diff) |
[XFS] Remove vn_revalidate calls in xfs.
These days most of the attributes in struct inode are properly kept in
sync by XFS. This patch removes the need for vn_revalidate completely by:
- keeping inode.i_flags uptodate after any flags are updated in
xfs_ioctl_setattr
- keeping i_mode, i_uid and i_gid uptodate in xfs_setattr
SGI-PV: 984566
SGI-Modid: xfs-linux-melb:xfs-kern:31679a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index d1b0da6bcdca..acb978d9d085 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -923,6 +923,30 @@ xfs_set_diflags( | |||
923 | ip->i_d.di_flags = di_flags; | 923 | ip->i_d.di_flags = di_flags; |
924 | } | 924 | } |
925 | 925 | ||
926 | STATIC void | ||
927 | xfs_diflags_to_linux( | ||
928 | struct xfs_inode *ip) | ||
929 | { | ||
930 | struct inode *inode = XFS_ITOV(ip); | ||
931 | unsigned int xflags = xfs_ip2xflags(ip); | ||
932 | |||
933 | if (xflags & XFS_XFLAG_IMMUTABLE) | ||
934 | inode->i_flags |= S_IMMUTABLE; | ||
935 | else | ||
936 | inode->i_flags &= ~S_IMMUTABLE; | ||
937 | if (xflags & XFS_XFLAG_APPEND) | ||
938 | inode->i_flags |= S_APPEND; | ||
939 | else | ||
940 | inode->i_flags &= ~S_APPEND; | ||
941 | if (xflags & XFS_XFLAG_SYNC) | ||
942 | inode->i_flags |= S_SYNC; | ||
943 | else | ||
944 | inode->i_flags &= ~S_SYNC; | ||
945 | if (xflags & XFS_XFLAG_NOATIME) | ||
946 | inode->i_flags |= S_NOATIME; | ||
947 | else | ||
948 | inode->i_flags &= ~S_NOATIME; | ||
949 | } | ||
926 | 950 | ||
927 | #define FSX_PROJID 1 | 951 | #define FSX_PROJID 1 |
928 | #define FSX_EXTSIZE 2 | 952 | #define FSX_EXTSIZE 2 |
@@ -1121,8 +1145,10 @@ xfs_ioctl_setattr( | |||
1121 | 1145 | ||
1122 | if (mask & FSX_EXTSIZE) | 1146 | if (mask & FSX_EXTSIZE) |
1123 | ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog; | 1147 | ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog; |
1124 | if (mask & FSX_XFLAGS) | 1148 | if (mask & FSX_XFLAGS) { |
1125 | xfs_set_diflags(ip, fa->fsx_xflags); | 1149 | xfs_set_diflags(ip, fa->fsx_xflags); |
1150 | xfs_diflags_to_linux(ip); | ||
1151 | } | ||
1126 | 1152 | ||
1127 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 1153 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
1128 | xfs_ichgtime(ip, XFS_ICHGTIME_CHG); | 1154 | xfs_ichgtime(ip, XFS_ICHGTIME_CHG); |
@@ -1160,7 +1186,6 @@ xfs_ioctl_setattr( | |||
1160 | (mask & FSX_NONBLOCK) ? DM_FLAGS_NDELAY : 0); | 1186 | (mask & FSX_NONBLOCK) ? DM_FLAGS_NDELAY : 0); |
1161 | } | 1187 | } |
1162 | 1188 | ||
1163 | vn_revalidate(XFS_ITOV(ip)); /* update flags */ | ||
1164 | return 0; | 1189 | return 0; |
1165 | 1190 | ||
1166 | error_return: | 1191 | error_return: |