From 4aeb664c2561c0bae18d7a3a141d7d2acf126da1 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 2 Nov 2005 11:43:58 +1100 Subject: =?UTF-8?q?[XFS]=20Improve=20buffered=20read=20throughput=20by=20r?= =?UTF-8?q?emoving=20unnecessary=20timer=20calls=20that=20showed=20in=20?= =?UTF-8?q?=C2=B4kernel=20profiles.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SGI-PV: 925163 SGI-Modid: xfs-linux:xfs-kern:23861a Signed-off-by: Nathan Scott --- fs/xfs/xfs_inode.c | 67 ------------------------------------------------------ 1 file changed, 67 deletions(-) (limited to 'fs/xfs/xfs_inode.c') 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; -- cgit v1.2.3