aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-02 11:43:58 +1100
committerNathan Scott <nathans@sgi.com>2005-11-02 11:43:58 +1100
commit4aeb664c2561c0bae18d7a3a141d7d2acf126da1 (patch)
tree832e72237a69b76bf4c965d7383cdbb9fc3f8939 /fs/xfs/xfs_inode.c
parent0fdfb3757f27b6d802f85e962d9b0f875df17113 (diff)
[XFS] Improve buffered read throughput by removing unnecessary timer calls
that showed in ´kernel profiles. SGI-PV: 925163 SGI-Modid: xfs-linux:xfs-kern:23861a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 5bf7b709f91..a648cc8ce96 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -3688,73 +3688,6 @@ xfs_iroundup(
return( 0 );
}
-/*
- * Change the requested timestamp in the given inode.
- * We don't lock across timestamp updates, and we don't log them but
- * we do record the fact that there is dirty information in core.
- *
- * NOTE -- callers MUST combine XFS_ICHGTIME_MOD or XFS_ICHGTIME_CHG
- * with XFS_ICHGTIME_ACC to be sure that access time
- * update will take. Calling first with XFS_ICHGTIME_ACC
- * and then XFS_ICHGTIME_MOD may fail to modify the access
- * timestamp if the filesystem is mounted noacctm.
- */
-void
-xfs_ichgtime(xfs_inode_t *ip,
- int flags)
-{
- timespec_t tv;
- vnode_t *vp = XFS_ITOV(ip);
- struct inode *inode = LINVFS_GET_IP(vp);
-
- /*
- * We're not supposed to change timestamps in readonly-mounted
- * filesystems. Throw it away if anyone asks us.
- */
- if (unlikely(vp->v_vfsp->vfs_flag & VFS_RDONLY))
- return;
-
- /*
- * Don't update access timestamps on reads if mounted "noatime"
- * Throw it away if anyone asks us.
- */
- if ((ip->i_mount->m_flags & XFS_MOUNT_NOATIME || IS_NOATIME(inode)) &&
- ((flags & (XFS_ICHGTIME_ACC|XFS_ICHGTIME_MOD|XFS_ICHGTIME_CHG))
- == XFS_ICHGTIME_ACC))
- return;
-
- nanotime(&tv);
- if (flags & XFS_ICHGTIME_MOD) {
- VN_MTIMESET(vp, &tv);
- ip->i_d.di_mtime.t_sec = (__int32_t)tv.tv_sec;
- ip->i_d.di_mtime.t_nsec = (__int32_t)tv.tv_nsec;
- }
- if (flags & XFS_ICHGTIME_ACC) {
- VN_ATIMESET(vp, &tv);
- ip->i_d.di_atime.t_sec = (__int32_t)tv.tv_sec;
- ip->i_d.di_atime.t_nsec = (__int32_t)tv.tv_nsec;
- }
- if (flags & XFS_ICHGTIME_CHG) {
- VN_CTIMESET(vp, &tv);
- ip->i_d.di_ctime.t_sec = (__int32_t)tv.tv_sec;
- ip->i_d.di_ctime.t_nsec = (__int32_t)tv.tv_nsec;
- }
-
- /*
- * We update the i_update_core field _after_ changing
- * the timestamps in order to coordinate properly with
- * xfs_iflush() so that we don't lose timestamp updates.
- * This keeps us from having to hold the inode lock
- * while doing this. We use the SYNCHRONIZE macro to
- * ensure that the compiler does not reorder the update
- * of i_update_core above the timestamp updates above.
- */
- SYNCHRONIZE();
- ip->i_update_core = 1;
- if (!(inode->i_state & I_LOCK))
- mark_inode_dirty_sync(inode);
-}
-
#ifdef XFS_ILOCK_TRACE
ktrace_t *xfs_ilock_trace_buf;