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
6e7e38df
Commit
6e7e38df
authored
Sep 25, 2003
by
Nathan Scott
Committed by
Stephen Lord
Sep 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Clean up inode revalidation code slightly
SGI Modid: 2.5.x-xfs:slinx:159031a
parent
35d30e0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
34 deletions
+37
-34
fs/xfs/linux/xfs_vnode.c
fs/xfs/linux/xfs_vnode.c
+1
-1
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+36
-33
No files found.
fs/xfs/linux/xfs_vnode.c
View file @
6e7e38df
...
...
@@ -200,7 +200,7 @@ vn_revalidate(
vn_trace_entry
(
vp
,
"vn_revalidate"
,
(
inst_t
*
)
__return_address
);
ASSERT
(
vp
->
v_fbhv
!=
NULL
);
va
.
va_mask
=
XFS_AT_STAT
|
XFS_AT_
GENCOUNT
;
va
.
va_mask
=
XFS_AT_STAT
|
XFS_AT_
XFLAGS
;
VOP_GETATTR
(
vp
,
&
va
,
0
,
NULL
,
error
);
if
(
!
error
)
{
inode
=
LINVFS_GET_IP
(
vp
);
...
...
fs/xfs/xfs_vnodeops.c
View file @
6e7e38df
...
...
@@ -144,11 +144,9 @@ xfs_getattr(
xfs_ilock
(
ip
,
XFS_ILOCK_SHARED
);
vap
->
va_size
=
ip
->
i_d
.
di_size
;
if
(
vap
->
va_mask
==
XFS_AT_SIZE
)
{
if
(
!
(
flags
&
ATTR_LAZY
))
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
return
0
;
}
if
(
vap
->
va_mask
==
XFS_AT_SIZE
)
goto
all_done
;
vap
->
va_nblocks
=
XFS_FSB_TO_BB
(
mp
,
ip
->
i_d
.
di_nblocks
+
ip
->
i_delayed_blks
);
vap
->
va_nodeid
=
ip
->
i_ino
;
...
...
@@ -162,11 +160,8 @@ xfs_getattr(
*/
if
((
vap
->
va_mask
&
~
(
XFS_AT_SIZE
|
XFS_AT_FSID
|
XFS_AT_NODEID
|
XFS_AT_NLINK
|
XFS_AT_BLKSIZE
))
==
0
)
{
if
(
!
(
flags
&
ATTR_LAZY
))
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
return
0
;
}
XFS_AT_NLINK
|
XFS_AT_BLKSIZE
))
==
0
)
goto
all_done
;
/*
* Copy from in-core inode.
...
...
@@ -250,37 +245,44 @@ xfs_getattr(
*/
if
((
vap
->
va_mask
&
(
XFS_AT_XFLAGS
|
XFS_AT_EXTSIZE
|
XFS_AT_NEXTENTS
|
XFS_AT_ANEXTENTS
|
XFS_AT_GENCOUNT
|
XFS_AT_VCODE
))
==
0
)
{
if
(
!
(
flags
&
ATTR_LAZY
))
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
return
0
;
}
XFS_AT_GENCOUNT
|
XFS_AT_VCODE
))
==
0
)
goto
all_done
;
/*
* convert di_flags to xflags
*/
vap
->
va_xflags
=
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_REALTIME
)
?
XFS_XFLAG_REALTIME
:
0
)
|
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_PREALLOC
)
?
XFS_XFLAG_PREALLOC
:
0
)
|
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_IMMUTABLE
)
?
XFS_XFLAG_IMMUTABLE
:
0
)
|
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_APPEND
)
?
XFS_XFLAG_APPEND
:
0
)
|
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_SYNC
)
?
XFS_XFLAG_SYNC
:
0
)
|
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_NOATIME
)
?
XFS_XFLAG_NOATIME
:
0
)
|
((
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_NODUMP
)
?
XFS_XFLAG_NODUMP:
0
)
|
(
XFS_IFORK_Q
(
ip
)
?
XFS_XFLAG_HASATTR
:
0
);
vap
->
va_xflags
=
0
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_REALTIME
)
vap
->
va_xflags
|=
XFS_XFLAG_REALTIME
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_PREALLOC
)
vap
->
va_xflags
|=
XFS_XFLAG_PREALLOC
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_IMMUTABLE
)
vap
->
va_xflags
|=
XFS_XFLAG_IMMUTABLE
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_APPEND
)
vap
->
va_xflags
|=
XFS_XFLAG_APPEND
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_SYNC
)
vap
->
va_xflags
|=
XFS_XFLAG_SYNC
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_NOATIME
)
vap
->
va_xflags
|=
XFS_XFLAG_NOATIME
;
if
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_NODUMP
)
vap
->
va_xflags
|=
XFS_XFLAG_NODUMP
;
if
(
XFS_IFORK_Q
(
ip
))
vap
->
va_xflags
|=
XFS_XFLAG_HASATTR
;
/*
* Exit for inode revalidate. See if any of the rest of
* the fields to be filled in are needed.
*/
if
((
vap
->
va_mask
&
(
XFS_AT_EXTSIZE
|
XFS_AT_NEXTENTS
|
XFS_AT_ANEXTENTS
|
XFS_AT_GENCOUNT
|
XFS_AT_VCODE
))
==
0
)
goto
all_done
;
vap
->
va_extsize
=
ip
->
i_d
.
di_extsize
<<
mp
->
m_sb
.
sb_blocklog
;
vap
->
va_nextents
=
(
ip
->
i_df
.
if_flags
&
XFS_IFEXTENTS
)
?
ip
->
i_df
.
if_bytes
/
sizeof
(
xfs_bmbt_rec_t
)
:
ip
->
i_d
.
di_nextents
;
if
(
ip
->
i_afp
!=
NULL
)
if
(
ip
->
i_afp
)
vap
->
va_anextents
=
(
ip
->
i_afp
->
if_flags
&
XFS_IFEXTENTS
)
?
ip
->
i_afp
->
if_bytes
/
sizeof
(
xfs_bmbt_rec_t
)
:
...
...
@@ -290,6 +292,7 @@ xfs_getattr(
vap
->
va_gencount
=
ip
->
i_d
.
di_gen
;
vap
->
va_vcode
=
0L
;
all_done:
if
(
!
(
flags
&
ATTR_LAZY
))
xfs_iunlock
(
ip
,
XFS_ILOCK_SHARED
);
return
0
;
...
...
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