diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:44:15 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:44:15 -0400 |
commit | dff35fd41f252476cba7f761d7204dd9f47d739e (patch) | |
tree | 3f4da55c3e5aede3de6d97a11bd0d53656aa6781 /fs/xfs/linux-2.6/xfs_iops.c | |
parent | ab4a9b04a33c97dd17495f943447f5a15ecf2b51 (diff) |
[XFS] update timestamp in xfs_ialloc manually
In xfs_ialloc we just want to set all timestamps to the current time. We
don't need to mark the inode dirty like xfs_ichgtime does, and we don't
need nor want the opimizations in xfs_ichgtime that I will introduce in
the next patch.
So just opencode the timestamp update in xfs_ialloc, and remove the new
unused XFS_ICHGTIME_ACC case in xfs_ichgtime.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31825a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index ace56bd3a5fb..d6947f818f29 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -89,12 +89,6 @@ xfs_mark_inode_dirty_sync( | |||
89 | * Change the requested timestamp in the given inode. | 89 | * Change the requested timestamp in the given inode. |
90 | * We don't lock across timestamp updates, and we don't log them but | 90 | * We don't lock across timestamp updates, and we don't log them but |
91 | * we do record the fact that there is dirty information in core. | 91 | * we do record the fact that there is dirty information in core. |
92 | * | ||
93 | * NOTE -- callers MUST combine XFS_ICHGTIME_MOD or XFS_ICHGTIME_CHG | ||
94 | * with XFS_ICHGTIME_ACC to be sure that access time | ||
95 | * update will take. Calling first with XFS_ICHGTIME_ACC | ||
96 | * and then XFS_ICHGTIME_MOD may fail to modify the access | ||
97 | * timestamp if the filesystem is mounted noacctm. | ||
98 | */ | 92 | */ |
99 | void | 93 | void |
100 | xfs_ichgtime( | 94 | xfs_ichgtime( |
@@ -110,11 +104,6 @@ xfs_ichgtime( | |||
110 | ip->i_d.di_mtime.t_sec = (__int32_t)tv.tv_sec; | 104 | ip->i_d.di_mtime.t_sec = (__int32_t)tv.tv_sec; |
111 | ip->i_d.di_mtime.t_nsec = (__int32_t)tv.tv_nsec; | 105 | ip->i_d.di_mtime.t_nsec = (__int32_t)tv.tv_nsec; |
112 | } | 106 | } |
113 | if (flags & XFS_ICHGTIME_ACC) { | ||
114 | inode->i_atime = tv; | ||
115 | ip->i_d.di_atime.t_sec = (__int32_t)tv.tv_sec; | ||
116 | ip->i_d.di_atime.t_nsec = (__int32_t)tv.tv_nsec; | ||
117 | } | ||
118 | if (flags & XFS_ICHGTIME_CHG) { | 107 | if (flags & XFS_ICHGTIME_CHG) { |
119 | inode->i_ctime = tv; | 108 | inode->i_ctime = tv; |
120 | ip->i_d.di_ctime.t_sec = (__int32_t)tv.tv_sec; | 109 | ip->i_d.di_ctime.t_sec = (__int32_t)tv.tv_sec; |
@@ -149,12 +138,6 @@ xfs_ichgtime_fast( | |||
149 | { | 138 | { |
150 | timespec_t *tvp; | 139 | timespec_t *tvp; |
151 | 140 | ||
152 | /* | ||
153 | * Atime updates for read() & friends are handled lazily now, and | ||
154 | * explicit updates must go through xfs_ichgtime() | ||
155 | */ | ||
156 | ASSERT((flags & XFS_ICHGTIME_ACC) == 0); | ||
157 | |||
158 | if (flags & XFS_ICHGTIME_MOD) { | 141 | if (flags & XFS_ICHGTIME_MOD) { |
159 | tvp = &inode->i_mtime; | 142 | tvp = &inode->i_mtime; |
160 | ip->i_d.di_mtime.t_sec = (__int32_t)tvp->tv_sec; | 143 | ip->i_d.di_mtime.t_sec = (__int32_t)tvp->tv_sec; |