Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18185
b: refs/heads/master
c: ca5ccbf
h: refs/heads/master
i:
  18183: a409332
v: v3
  • Loading branch information
Nathan Scott committed Jan 11, 2006
1 parent 0a07cee commit 096e7ba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1259845d3f3e1d1cf96b2a78f3aec824b9d1e109
refs/heads/master: ca5ccbf98d792d8727e893765cc2df479ba399f2
19 changes: 19 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,25 @@ static inline int VN_BAD(struct vnode *vp)
return is_bad_inode(LINVFS_GET_IP(vp));
}

/*
* Extracting atime values in various formats
*/
static inline void vn_atime_to_bstime(struct vnode *vp, xfs_bstime_t *bs_atime)
{
bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec;
bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec;
}

static inline void vn_atime_to_timespec(struct vnode *vp, struct timespec *ts)
{
*ts = vp->v_inode.i_atime;
}

static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt)
{
*tt = vp->v_inode.i_atime.tv_sec;
}

/*
* Some useful predicates.
*/
Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/xfs/xfs_itable.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ xfs_bulkstat_one_iget(
buf->bs_uid = dic->di_uid;
buf->bs_gid = dic->di_gid;
buf->bs_size = dic->di_size;
/* atime is only kept uptodate in the Linux inode */
buf->bs_atime.tv_sec = vp->v_inode.i_atime.tv_sec;
buf->bs_atime.tv_nsec = vp->v_inode.i_atime.tv_nsec;
vn_atime_to_bstime(vp, &buf->bs_atime);
buf->bs_mtime.tv_sec = dic->di_mtime.t_sec;
buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec;
buf->bs_ctime.tv_sec = dic->di_ctime.t_sec;
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ xfs_getattr(
break;
}

/* atime is only kept uptodate in the Linux inode */
vap->va_atime = vp->v_inode.i_atime;
vn_atime_to_timespec(vp, &vap->va_atime);
vap->va_mtime.tv_sec = ip->i_d.di_mtime.t_sec;
vap->va_mtime.tv_nsec = ip->i_d.di_mtime.t_nsec;
vap->va_ctime.tv_sec = ip->i_d.di_ctime.t_sec;
Expand Down

0 comments on commit 096e7ba

Please sign in to comment.