Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
26ffe53e
Commit
26ffe53e
authored
Jan 10, 2004
by
Nathan Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Use vnode timespec modifiers for atime/mtime/ctime, keeps last code hunk in sync.
SGI Modid: 2.5.x-xfs:slinx:162783a
parent
0d39ce1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
fs/xfs/linux/xfs_vnode.h
fs/xfs/linux/xfs_vnode.h
+7
-0
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.c
+4
-4
No files found.
fs/xfs/linux/xfs_vnode.h
View file @
26ffe53e
...
...
@@ -586,6 +586,13 @@ static __inline__ void vn_flagclr(struct vnode *vp, uint flag)
spin_unlock
(
&
vp
->
v_lock
);
}
/*
* Update modify/access/change times on the vnode
*/
#define VN_MTIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_mtime = *(tvp))
#define VN_ATIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_atime = *(tvp))
#define VN_CTIMESET(vp, tvp) (LINVFS_GET_IP(vp)->i_ctime = *(tvp))
/*
* Some useful predicates.
*/
...
...
fs/xfs/xfs_inode.c
View file @
26ffe53e
...
...
@@ -3799,7 +3799,7 @@ xfs_ichgtime(xfs_inode_t *ip,
* We're not supposed to change timestamps in readonly-mounted
* filesystems. Throw it away if anyone asks us.
*/
if
(
vp
->
v_vfsp
->
vfs_flag
&
VFS_RDONLY
)
if
(
unlikely
(
vp
->
v_vfsp
->
vfs_flag
&
VFS_RDONLY
)
)
return
;
/*
...
...
@@ -3813,17 +3813,17 @@ xfs_ichgtime(xfs_inode_t *ip,
nanotime
(
&
tv
);
if
(
flags
&
XFS_ICHGTIME_MOD
)
{
inode
->
i_mtime
=
tv
;
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
)
{
inode
->
i_atime
=
tv
;
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
)
{
inode
->
i_ctime
=
tv
;
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment