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
Kirill Smelkov
linux
Commits
76897d18
Commit
76897d18
authored
Sep 15, 2003
by
Eric Sandeen
Committed by
Stephen Lord
Sep 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Re-work xfs stats macros to support per-cpu data
SGI Modid: 2.5.x-xfs:slinx:156453a
parent
57b6451f
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
89 additions
and
89 deletions
+89
-89
fs/xfs/linux/xfs_iomap.c
fs/xfs/linux/xfs_iomap.c
+2
-2
fs/xfs/linux/xfs_lrw.c
fs/xfs/linux/xfs_lrw.c
+6
-6
fs/xfs/linux/xfs_stats.h
fs/xfs/linux/xfs_stats.h
+3
-3
fs/xfs/linux/xfs_vnode.c
fs/xfs/linux/xfs_vnode.c
+8
-8
fs/xfs/xfs_alloc.c
fs/xfs/xfs_alloc.c
+4
-4
fs/xfs/xfs_alloc_btree.c
fs/xfs/xfs_alloc_btree.c
+5
-5
fs/xfs/xfs_attr.c
fs/xfs/xfs_attr.c
+4
-4
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.c
+8
-8
fs/xfs/xfs_bmap_btree.c
fs/xfs/xfs_bmap_btree.c
+4
-4
fs/xfs/xfs_dir.c
fs/xfs/xfs_dir.c
+4
-4
fs/xfs/xfs_dir2.c
fs/xfs/xfs_dir2.c
+4
-4
fs/xfs/xfs_iget.c
fs/xfs/xfs_iget.c
+10
-10
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.c
+3
-3
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+12
-12
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.c
+3
-3
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_ail.c
+8
-8
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+1
-1
No files found.
fs/xfs/linux/xfs_iomap.c
View file @
76897d18
...
@@ -598,7 +598,7 @@ xfs_iomap_write_allocate(
...
@@ -598,7 +598,7 @@ xfs_iomap_write_allocate(
count_fsb
=
map
->
br_blockcount
;
count_fsb
=
map
->
br_blockcount
;
map_start_fsb
=
offset_fsb
;
map_start_fsb
=
offset_fsb
;
XFS_STATS_ADD
(
x
fsstats
.
x
s_xstrat_bytes
,
XFS_FSB_TO_B
(
mp
,
count_fsb
));
XFS_STATS_ADD
(
xs_xstrat_bytes
,
XFS_FSB_TO_B
(
mp
,
count_fsb
));
while
(
count_fsb
!=
0
)
{
while
(
count_fsb
!=
0
)
{
/*
/*
...
@@ -689,7 +689,7 @@ xfs_iomap_write_allocate(
...
@@ -689,7 +689,7 @@ xfs_iomap_write_allocate(
imap
[
i
].
br_blockcount
)))
{
imap
[
i
].
br_blockcount
)))
{
*
map
=
imap
[
i
];
*
map
=
imap
[
i
];
*
retmap
=
1
;
*
retmap
=
1
;
XFS_STATS_INC
(
x
fsstats
.
x
s_xstrat_quick
);
XFS_STATS_INC
(
xs_xstrat_quick
);
return
0
;
return
0
;
}
}
count_fsb
-=
imap
[
i
].
br_blockcount
;
count_fsb
-=
imap
[
i
].
br_blockcount
;
...
...
fs/xfs/linux/xfs_lrw.c
View file @
76897d18
...
@@ -167,7 +167,7 @@ xfs_read(
...
@@ -167,7 +167,7 @@ xfs_read(
mp
=
ip
->
i_mount
;
mp
=
ip
->
i_mount
;
vn_trace_entry
(
vp
,
"xfs_read"
,
(
inst_t
*
)
__return_address
);
vn_trace_entry
(
vp
,
"xfs_read"
,
(
inst_t
*
)
__return_address
);
XFS_STATS_INC
(
x
fsstats
.
x
s_read_calls
);
XFS_STATS_INC
(
xs_read_calls
);
/* START copy & waste from filemap.c */
/* START copy & waste from filemap.c */
for
(
seg
=
0
;
seg
<
segs
;
seg
++
)
{
for
(
seg
=
0
;
seg
<
segs
;
seg
++
)
{
...
@@ -231,7 +231,7 @@ xfs_read(
...
@@ -231,7 +231,7 @@ xfs_read(
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
if
(
ret
>
0
)
if
(
ret
>
0
)
XFS_STATS_ADD
(
x
fsstats
.
x
s_read_bytes
,
ret
);
XFS_STATS_ADD
(
xs_read_bytes
,
ret
);
if
(
!
invisible
)
if
(
!
invisible
)
xfs_ichgtime
(
ip
,
XFS_ICHGTIME_ACC
);
xfs_ichgtime
(
ip
,
XFS_ICHGTIME_ACC
);
...
@@ -261,7 +261,7 @@ xfs_sendfile(
...
@@ -261,7 +261,7 @@ xfs_sendfile(
mp
=
ip
->
i_mount
;
mp
=
ip
->
i_mount
;
vn_trace_entry
(
vp
,
"xfs_sendfile"
,
(
inst_t
*
)
__return_address
);
vn_trace_entry
(
vp
,
"xfs_sendfile"
,
(
inst_t
*
)
__return_address
);
XFS_STATS_INC
(
x
fsstats
.
x
s_read_calls
);
XFS_STATS_INC
(
xs_read_calls
);
n
=
XFS_MAXIOFFSET
(
mp
)
-
*
offset
;
n
=
XFS_MAXIOFFSET
(
mp
)
-
*
offset
;
if
((
n
<=
0
)
||
(
count
==
0
))
if
((
n
<=
0
)
||
(
count
==
0
))
...
@@ -288,7 +288,7 @@ xfs_sendfile(
...
@@ -288,7 +288,7 @@ xfs_sendfile(
ret
=
generic_file_sendfile
(
filp
,
offset
,
count
,
actor
,
target
);
ret
=
generic_file_sendfile
(
filp
,
offset
,
count
,
actor
,
target
);
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
XFS_STATS_ADD
(
x
fsstats
.
x
s_read_bytes
,
ret
);
XFS_STATS_ADD
(
xs_read_bytes
,
ret
);
if
(
!
invisible
)
if
(
!
invisible
)
xfs_ichgtime
(
ip
,
XFS_ICHGTIME_ACC
);
xfs_ichgtime
(
ip
,
XFS_ICHGTIME_ACC
);
return
ret
;
return
ret
;
...
@@ -537,7 +537,7 @@ xfs_write(
...
@@ -537,7 +537,7 @@ xfs_write(
int
eventsent
=
0
;
int
eventsent
=
0
;
vrwlock_t
locktype
;
vrwlock_t
locktype
;
XFS_STATS_INC
(
x
fsstats
.
x
s_write_calls
);
XFS_STATS_INC
(
xs_write_calls
);
vp
=
BHV_TO_VNODE
(
bdp
);
vp
=
BHV_TO_VNODE
(
bdp
);
vn_trace_entry
(
vp
,
"xfs_write"
,
(
inst_t
*
)
__return_address
);
vn_trace_entry
(
vp
,
"xfs_write"
,
(
inst_t
*
)
__return_address
);
...
@@ -722,7 +722,7 @@ xfs_write(
...
@@ -722,7 +722,7 @@ xfs_write(
return
ret
;
return
ret
;
}
}
XFS_STATS_ADD
(
x
fsstats
.
x
s_write_bytes
,
ret
);
XFS_STATS_ADD
(
xs_write_bytes
,
ret
);
/* Handle various SYNC-type writes */
/* Handle various SYNC-type writes */
if
((
file
->
f_flags
&
O_SYNC
)
||
IS_SYNC
(
file
->
f_dentry
->
d_inode
))
{
if
((
file
->
f_flags
&
O_SYNC
)
||
IS_SYNC
(
file
->
f_dentry
->
d_inode
))
{
...
...
fs/xfs/linux/xfs_stats.h
View file @
76897d18
...
@@ -128,9 +128,9 @@ struct xfsstats {
...
@@ -128,9 +128,9 @@ struct xfsstats {
extern
struct
xfsstats
xfsstats
;
extern
struct
xfsstats
xfsstats
;
# define XFS_STATS_INC(count) (
(count)
++ )
# define XFS_STATS_INC(count) (
xfsstats.count
++ )
# define XFS_STATS_DEC(count) (
(count)
-- )
# define XFS_STATS_DEC(count) (
xfsstats.count
-- )
# define XFS_STATS_ADD(count, inc) (
(count)
+= (inc) )
# define XFS_STATS_ADD(count, inc) (
xfsstats.count
+= (inc) )
extern
void
xfs_init_procfs
(
void
);
extern
void
xfs_init_procfs
(
void
);
extern
void
xfs_cleanup_procfs
(
void
);
extern
void
xfs_cleanup_procfs
(
void
);
...
...
fs/xfs/linux/xfs_vnode.c
View file @
76897d18
...
@@ -77,7 +77,7 @@ vn_reclaim(
...
@@ -77,7 +77,7 @@ vn_reclaim(
{
{
int
error
;
int
error
;
XFS_STATS_INC
(
xfsstats
.
vn_reclaim
);
XFS_STATS_INC
(
vn_reclaim
);
vn_trace_entry
(
vp
,
"vn_reclaim"
,
(
inst_t
*
)
__return_address
);
vn_trace_entry
(
vp
,
"vn_reclaim"
,
(
inst_t
*
)
__return_address
);
/*
/*
...
@@ -137,8 +137,8 @@ vn_initialize(
...
@@ -137,8 +137,8 @@ vn_initialize(
{
{
struct
vnode
*
vp
=
LINVFS_GET_VP
(
inode
);
struct
vnode
*
vp
=
LINVFS_GET_VP
(
inode
);
XFS_STATS_INC
(
xfsstats
.
vn_active
);
XFS_STATS_INC
(
vn_active
);
XFS_STATS_INC
(
xfsstats
.
vn_alloc
);
XFS_STATS_INC
(
vn_alloc
);
vp
->
v_flag
=
VMODIFIED
;
vp
->
v_flag
=
VMODIFIED
;
spinlock_init
(
&
vp
->
v_lock
,
"v_lock"
);
spinlock_init
(
&
vp
->
v_lock
,
"v_lock"
);
...
@@ -172,7 +172,7 @@ vn_get(
...
@@ -172,7 +172,7 @@ vn_get(
{
{
struct
inode
*
inode
;
struct
inode
*
inode
;
XFS_STATS_INC
(
xfsstats
.
vn_get
);
XFS_STATS_INC
(
vn_get
);
inode
=
LINVFS_GET_IP
(
vp
);
inode
=
LINVFS_GET_IP
(
vp
);
if
(
inode
->
i_state
&
I_FREEING
)
if
(
inode
->
i_state
&
I_FREEING
)
return
NULL
;
return
NULL
;
...
@@ -280,7 +280,7 @@ vn_purge(
...
@@ -280,7 +280,7 @@ vn_purge(
return
;
return
;
}
}
XFS_STATS_DEC
(
xfsstats
.
vn_active
);
XFS_STATS_DEC
(
vn_active
);
vp
->
v_flag
|=
VRECLM
;
vp
->
v_flag
|=
VRECLM
;
VN_UNLOCK
(
vp
,
0
);
VN_UNLOCK
(
vp
,
0
);
...
@@ -308,7 +308,7 @@ vn_hold(
...
@@ -308,7 +308,7 @@ vn_hold(
{
{
struct
inode
*
inode
;
struct
inode
*
inode
;
XFS_STATS_INC
(
xfsstats
.
vn_hold
);
XFS_STATS_INC
(
vn_hold
);
VN_LOCK
(
vp
);
VN_LOCK
(
vp
);
inode
=
igrab
(
LINVFS_GET_IP
(
vp
));
inode
=
igrab
(
LINVFS_GET_IP
(
vp
));
...
@@ -328,7 +328,7 @@ vn_rele(
...
@@ -328,7 +328,7 @@ vn_rele(
int
vcnt
;
int
vcnt
;
int
cache
;
int
cache
;
XFS_STATS_INC
(
xfsstats
.
vn_rele
);
XFS_STATS_INC
(
vn_rele
);
VN_LOCK
(
vp
);
VN_LOCK
(
vp
);
...
@@ -380,7 +380,7 @@ vn_remove(
...
@@ -380,7 +380,7 @@ vn_remove(
if
(
!
(
vp
->
v_fbhv
))
if
(
!
(
vp
->
v_fbhv
))
return
;
return
;
XFS_STATS_INC
(
xfsstats
.
vn_remove
);
XFS_STATS_INC
(
vn_remove
);
vn_trace_exit
(
vp
,
"vn_remove"
,
(
inst_t
*
)
__return_address
);
vn_trace_exit
(
vp
,
"vn_remove"
,
(
inst_t
*
)
__return_address
);
/*
/*
...
...
fs/xfs/xfs_alloc.c
View file @
76897d18
...
@@ -636,8 +636,8 @@ xfs_alloc_ag_vextent(
...
@@ -636,8 +636,8 @@ xfs_alloc_ag_vextent(
xfs_trans_mod_sb
(
args
->
tp
,
xfs_trans_mod_sb
(
args
->
tp
,
args
->
wasdel
?
XFS_TRANS_SB_RES_FDBLOCKS
:
args
->
wasdel
?
XFS_TRANS_SB_RES_FDBLOCKS
:
XFS_TRANS_SB_FDBLOCKS
,
-
slen
);
XFS_TRANS_SB_FDBLOCKS
,
-
slen
);
XFS_STATS_INC
(
x
fsstats
.
x
s_allocx
);
XFS_STATS_INC
(
xs_allocx
);
XFS_STATS_ADD
(
x
fsstats
.
x
s_allocb
,
args
->
len
);
XFS_STATS_ADD
(
xs_allocb
,
args
->
len
);
}
}
return
0
;
return
0
;
}
}
...
@@ -1781,8 +1781,8 @@ xfs_free_ag_extent(
...
@@ -1781,8 +1781,8 @@ xfs_free_ag_extent(
xfs_alloc_log_agf
(
tp
,
agbp
,
XFS_AGF_FREEBLKS
);
xfs_alloc_log_agf
(
tp
,
agbp
,
XFS_AGF_FREEBLKS
);
if
(
!
isfl
)
if
(
!
isfl
)
xfs_trans_mod_sb
(
tp
,
XFS_TRANS_SB_FDBLOCKS
,
(
long
)
len
);
xfs_trans_mod_sb
(
tp
,
XFS_TRANS_SB_FDBLOCKS
,
(
long
)
len
);
XFS_STATS_INC
(
x
fsstats
.
x
s_freex
);
XFS_STATS_INC
(
xs_freex
);
XFS_STATS_ADD
(
x
fsstats
.
x
s_freeb
,
len
);
XFS_STATS_ADD
(
xs_freeb
,
len
);
}
}
TRACE_FREE
(
haveleft
?
TRACE_FREE
(
haveleft
?
(
haveright
?
"both"
:
"left"
)
:
(
haveright
?
"both"
:
"left"
)
:
...
...
fs/xfs/xfs_alloc_btree.c
View file @
76897d18
...
@@ -133,7 +133,7 @@ xfs_alloc_delrec(
...
@@ -133,7 +133,7 @@ xfs_alloc_delrec(
*
stat
=
0
;
*
stat
=
0
;
return
0
;
return
0
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_abt_delrec
);
XFS_STATS_INC
(
xs_abt_delrec
);
/*
/*
* It's a nonleaf. Excise the key and ptr being deleted, by
* It's a nonleaf. Excise the key and ptr being deleted, by
* sliding the entries past them down one.
* sliding the entries past them down one.
...
@@ -631,7 +631,7 @@ xfs_alloc_insrec(
...
@@ -631,7 +631,7 @@ xfs_alloc_insrec(
* and we're done.
* and we're done.
*/
*/
if
(
level
>=
cur
->
bc_nlevels
)
{
if
(
level
>=
cur
->
bc_nlevels
)
{
XFS_STATS_INC
(
x
fsstats
.
x
s_abt_insrec
);
XFS_STATS_INC
(
xs_abt_insrec
);
if
((
error
=
xfs_alloc_newroot
(
cur
,
&
i
)))
if
((
error
=
xfs_alloc_newroot
(
cur
,
&
i
)))
return
error
;
return
error
;
*
bnop
=
NULLAGBLOCK
;
*
bnop
=
NULLAGBLOCK
;
...
@@ -651,7 +651,7 @@ xfs_alloc_insrec(
...
@@ -651,7 +651,7 @@ xfs_alloc_insrec(
*
stat
=
0
;
*
stat
=
0
;
return
0
;
return
0
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_abt_insrec
);
XFS_STATS_INC
(
xs_abt_insrec
);
/*
/*
* Get pointers to the btree buffer and block.
* Get pointers to the btree buffer and block.
*/
*/
...
@@ -951,7 +951,7 @@ xfs_alloc_lookup(
...
@@ -951,7 +951,7 @@ xfs_alloc_lookup(
int
level
;
/* level in the btree */
int
level
;
/* level in the btree */
xfs_mount_t
*
mp
;
/* file system mount point */
xfs_mount_t
*
mp
;
/* file system mount point */
XFS_STATS_INC
(
x
fsstats
.
x
s_abt_lookup
);
XFS_STATS_INC
(
xs_abt_lookup
);
/*
/*
* Get the allocation group header, and the root block number.
* Get the allocation group header, and the root block number.
*/
*/
...
@@ -1046,7 +1046,7 @@ xfs_alloc_lookup(
...
@@ -1046,7 +1046,7 @@ xfs_alloc_lookup(
xfs_extlen_t
blockcount
;
/* key value */
xfs_extlen_t
blockcount
;
/* key value */
xfs_agblock_t
startblock
;
/* key value */
xfs_agblock_t
startblock
;
/* key value */
XFS_STATS_INC
(
x
fsstats
.
x
s_abt_compare
);
XFS_STATS_INC
(
xs_abt_compare
);
/*
/*
* keyno is average of low and high.
* keyno is average of low and high.
*/
*/
...
...
fs/xfs/xfs_attr.c
View file @
76897d18
...
@@ -131,7 +131,7 @@ xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp,
...
@@ -131,7 +131,7 @@ xfs_attr_get(bhv_desc_t *bdp, char *name, char *value, int *valuelenp,
namelen
=
strlen
(
name
);
namelen
=
strlen
(
name
);
if
(
namelen
>=
MAXNAMELEN
)
if
(
namelen
>=
MAXNAMELEN
)
return
EFAULT
;
/* match IRIX behaviour */
return
EFAULT
;
/* match IRIX behaviour */
XFS_STATS_INC
(
x
fsstats
.
x
s_attr_get
);
XFS_STATS_INC
(
xs_attr_get
);
if
(
XFS_IFORK_Q
(
ip
)
==
0
)
if
(
XFS_IFORK_Q
(
ip
)
==
0
)
return
ENOATTR
;
return
ENOATTR
;
...
@@ -210,7 +210,7 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags,
...
@@ -210,7 +210,7 @@ xfs_attr_set(bhv_desc_t *bdp, char *name, char *value, int valuelen, int flags,
if
(
namelen
>=
MAXNAMELEN
)
if
(
namelen
>=
MAXNAMELEN
)
return
EFAULT
;
/* match irix behaviour */
return
EFAULT
;
/* match irix behaviour */
XFS_STATS_INC
(
x
fsstats
.
x
s_attr_set
);
XFS_STATS_INC
(
xs_attr_set
);
/*
/*
* Do we answer them, or ignore them?
* Do we answer them, or ignore them?
*/
*/
...
@@ -468,7 +468,7 @@ xfs_attr_remove(bhv_desc_t *bdp, char *name, int flags, struct cred *cred)
...
@@ -468,7 +468,7 @@ xfs_attr_remove(bhv_desc_t *bdp, char *name, int flags, struct cred *cred)
if
(
namelen
>=
MAXNAMELEN
)
if
(
namelen
>=
MAXNAMELEN
)
return
EFAULT
;
/* match irix behaviour */
return
EFAULT
;
/* match irix behaviour */
XFS_STATS_INC
(
x
fsstats
.
x
s_attr_remove
);
XFS_STATS_INC
(
xs_attr_remove
);
/*
/*
* Do we answer them, or ignore them?
* Do we answer them, or ignore them?
...
@@ -620,7 +620,7 @@ xfs_attr_list(bhv_desc_t *bdp, char *buffer, int bufsize, int flags,
...
@@ -620,7 +620,7 @@ xfs_attr_list(bhv_desc_t *bdp, char *buffer, int bufsize, int flags,
xfs_inode_t
*
dp
;
xfs_inode_t
*
dp
;
int
error
;
int
error
;
XFS_STATS_INC
(
x
fsstats
.
x
s_attr_list
);
XFS_STATS_INC
(
xs_attr_list
);
/*
/*
* Validate the cursor.
* Validate the cursor.
...
...
fs/xfs/xfs_bmap.c
View file @
76897d18
...
@@ -564,7 +564,7 @@ xfs_bmap_add_extent(
...
@@ -564,7 +564,7 @@ xfs_bmap_add_extent(
int
logflags
;
/* returned value */
int
logflags
;
/* returned value */
xfs_extnum_t
nextents
;
/* number of extents in file now */
xfs_extnum_t
nextents
;
/* number of extents in file now */
XFS_STATS_INC
(
x
fsstats
.
x
s_add_exlist
);
XFS_STATS_INC
(
xs_add_exlist
);
cur
=
*
curp
;
cur
=
*
curp
;
ifp
=
XFS_IFORK_PTR
(
ip
,
whichfork
);
ifp
=
XFS_IFORK_PTR
(
ip
,
whichfork
);
nextents
=
ifp
->
if_bytes
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
);
nextents
=
ifp
->
if_bytes
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
);
...
@@ -2836,7 +2836,7 @@ xfs_bmap_del_extent(
...
@@ -2836,7 +2836,7 @@ xfs_bmap_del_extent(
xfs_filblks_t
temp
;
/* for indirect length calculations */
xfs_filblks_t
temp
;
/* for indirect length calculations */
xfs_filblks_t
temp2
;
/* for indirect length calculations */
xfs_filblks_t
temp2
;
/* for indirect length calculations */
XFS_STATS_INC
(
x
fsstats
.
x
s_del_exlist
);
XFS_STATS_INC
(
xs_del_exlist
);
mp
=
ip
->
i_mount
;
mp
=
ip
->
i_mount
;
ifp
=
XFS_IFORK_PTR
(
ip
,
whichfork
);
ifp
=
XFS_IFORK_PTR
(
ip
,
whichfork
);
nextents
=
ifp
->
if_bytes
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
);
nextents
=
ifp
->
if_bytes
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
);
...
@@ -3461,7 +3461,7 @@ xfs_bmap_do_search_extents(
...
@@ -3461,7 +3461,7 @@ xfs_bmap_do_search_extents(
low
=
0
;
low
=
0
;
high
=
nextents
-
1
;
high
=
nextents
-
1
;
while
(
low
<=
high
)
{
while
(
low
<=
high
)
{
XFS_STATS_INC
(
x
fsstats
.
x
s_cmp_exlist
);
XFS_STATS_INC
(
xs_cmp_exlist
);
lastx
=
(
low
+
high
)
>>
1
;
lastx
=
(
low
+
high
)
>>
1
;
ep
=
base
+
lastx
;
ep
=
base
+
lastx
;
got
.
br_startoff
=
xfs_bmbt_get_startoff
(
ep
);
got
.
br_startoff
=
xfs_bmbt_get_startoff
(
ep
);
...
@@ -3531,7 +3531,7 @@ xfs_bmap_search_extents(
...
@@ -3531,7 +3531,7 @@ xfs_bmap_search_extents(
xfs_extnum_t
lastx
;
/* last extent index used */
xfs_extnum_t
lastx
;
/* last extent index used */
xfs_extnum_t
nextents
;
/* extent list size */
xfs_extnum_t
nextents
;
/* extent list size */
XFS_STATS_INC
(
x
fsstats
.
x
s_look_exlist
);
XFS_STATS_INC
(
xs_look_exlist
);
ifp
=
XFS_IFORK_PTR
(
ip
,
whichfork
);
ifp
=
XFS_IFORK_PTR
(
ip
,
whichfork
);
lastx
=
ifp
->
if_lastex
;
lastx
=
ifp
->
if_lastex
;
nextents
=
ifp
->
if_bytes
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
);
nextents
=
ifp
->
if_bytes
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
);
...
@@ -4629,9 +4629,9 @@ xfs_bmapi(
...
@@ -4629,9 +4629,9 @@ xfs_bmapi(
ASSERT
(
ifp
->
if_ext_max
==
ASSERT
(
ifp
->
if_ext_max
==
XFS_IFORK_SIZE
(
ip
,
whichfork
)
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
));
XFS_IFORK_SIZE
(
ip
,
whichfork
)
/
(
uint
)
sizeof
(
xfs_bmbt_rec_t
));
if
((
wr
=
(
flags
&
XFS_BMAPI_WRITE
))
!=
0
)
if
((
wr
=
(
flags
&
XFS_BMAPI_WRITE
))
!=
0
)
XFS_STATS_INC
(
x
fsstats
.
x
s_blk_mapw
);
XFS_STATS_INC
(
xs_blk_mapw
);
else
else
XFS_STATS_INC
(
x
fsstats
.
x
s_blk_mapr
);
XFS_STATS_INC
(
xs_blk_mapr
);
delay
=
(
flags
&
XFS_BMAPI_DELAY
)
!=
0
;
delay
=
(
flags
&
XFS_BMAPI_DELAY
)
!=
0
;
trim
=
(
flags
&
XFS_BMAPI_ENTIRE
)
==
0
;
trim
=
(
flags
&
XFS_BMAPI_ENTIRE
)
==
0
;
userdata
=
(
flags
&
XFS_BMAPI_METADATA
)
==
0
;
userdata
=
(
flags
&
XFS_BMAPI_METADATA
)
==
0
;
...
@@ -5115,7 +5115,7 @@ xfs_bmapi_single(
...
@@ -5115,7 +5115,7 @@ xfs_bmapi_single(
}
}
if
(
XFS_FORCED_SHUTDOWN
(
ip
->
i_mount
))
if
(
XFS_FORCED_SHUTDOWN
(
ip
->
i_mount
))
return
XFS_ERROR
(
EIO
);
return
XFS_ERROR
(
EIO
);
XFS_STATS_INC
(
x
fsstats
.
x
s_blk_mapr
);
XFS_STATS_INC
(
xs_blk_mapr
);
if
(
!
(
ifp
->
if_flags
&
XFS_IFEXTENTS
)
&&
if
(
!
(
ifp
->
if_flags
&
XFS_IFEXTENTS
)
&&
(
error
=
xfs_iread_extents
(
tp
,
ip
,
whichfork
)))
(
error
=
xfs_iread_extents
(
tp
,
ip
,
whichfork
)))
return
error
;
return
error
;
...
@@ -5204,7 +5204,7 @@ xfs_bunmapi(
...
@@ -5204,7 +5204,7 @@ xfs_bunmapi(
*
done
=
1
;
*
done
=
1
;
return
0
;
return
0
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_blk_unmap
);
XFS_STATS_INC
(
xs_blk_unmap
);
isrt
=
(
whichfork
==
XFS_DATA_FORK
)
&&
isrt
=
(
whichfork
==
XFS_DATA_FORK
)
&&
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_REALTIME
);
(
ip
->
i_d
.
di_flags
&
XFS_DIFLAG_REALTIME
);
start
=
bno
;
start
=
bno
;
...
...
fs/xfs/xfs_bmap_btree.c
View file @
76897d18
...
@@ -392,7 +392,7 @@ xfs_bmbt_delrec(
...
@@ -392,7 +392,7 @@ xfs_bmbt_delrec(
*
stat
=
0
;
*
stat
=
0
;
return
0
;
return
0
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_bmbt_delrec
);
XFS_STATS_INC
(
xs_bmbt_delrec
);
if
(
level
>
0
)
{
if
(
level
>
0
)
{
kp
=
XFS_BMAP_KEY_IADDR
(
block
,
1
,
cur
);
kp
=
XFS_BMAP_KEY_IADDR
(
block
,
1
,
cur
);
pp
=
XFS_BMAP_PTR_IADDR
(
block
,
1
,
cur
);
pp
=
XFS_BMAP_PTR_IADDR
(
block
,
1
,
cur
);
...
@@ -784,7 +784,7 @@ xfs_bmbt_insrec(
...
@@ -784,7 +784,7 @@ xfs_bmbt_insrec(
*
stat
=
0
;
*
stat
=
0
;
return
0
;
return
0
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_bmbt_insrec
);
XFS_STATS_INC
(
xs_bmbt_insrec
);
block
=
xfs_bmbt_get_block
(
cur
,
level
,
&
bp
);
block
=
xfs_bmbt_get_block
(
cur
,
level
,
&
bp
);
numrecs
=
INT_GET
(
block
->
bb_numrecs
,
ARCH_CONVERT
);
numrecs
=
INT_GET
(
block
->
bb_numrecs
,
ARCH_CONVERT
);
#ifdef DEBUG
#ifdef DEBUG
...
@@ -1137,7 +1137,7 @@ xfs_bmbt_lookup(
...
@@ -1137,7 +1137,7 @@ xfs_bmbt_lookup(
xfs_fileoff_t
startoff
;
xfs_fileoff_t
startoff
;
xfs_trans_t
*
tp
;
xfs_trans_t
*
tp
;
XFS_STATS_INC
(
x
fsstats
.
x
s_bmbt_lookup
);
XFS_STATS_INC
(
xs_bmbt_lookup
);
XFS_BMBT_TRACE_CURSOR
(
cur
,
ENTRY
);
XFS_BMBT_TRACE_CURSOR
(
cur
,
ENTRY
);
XFS_BMBT_TRACE_ARGI
(
cur
,
(
int
)
dir
);
XFS_BMBT_TRACE_ARGI
(
cur
,
(
int
)
dir
);
tp
=
cur
->
bc_tp
;
tp
=
cur
->
bc_tp
;
...
@@ -1182,7 +1182,7 @@ xfs_bmbt_lookup(
...
@@ -1182,7 +1182,7 @@ xfs_bmbt_lookup(
return
0
;
return
0
;
}
}
while
(
low
<=
high
)
{
while
(
low
<=
high
)
{
XFS_STATS_INC
(
x
fsstats
.
x
s_bmbt_compare
);
XFS_STATS_INC
(
xs_bmbt_compare
);
keyno
=
(
low
+
high
)
>>
1
;
keyno
=
(
low
+
high
)
>>
1
;
if
(
level
>
0
)
{
if
(
level
>
0
)
{
kkp
=
kkbase
+
keyno
-
1
;
kkp
=
kkbase
+
keyno
-
1
;
...
...
fs/xfs/xfs_dir.c
View file @
76897d18
...
@@ -262,7 +262,7 @@ xfs_dir_createname(xfs_trans_t *trans, xfs_inode_t *dp, char *name,
...
@@ -262,7 +262,7 @@ xfs_dir_createname(xfs_trans_t *trans, xfs_inode_t *dp, char *name,
if
((
retval
=
xfs_dir_ino_validate
(
trans
->
t_mountp
,
inum
)))
if
((
retval
=
xfs_dir_ino_validate
(
trans
->
t_mountp
,
inum
)))
return
(
retval
);
return
(
retval
);
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_create
);
XFS_STATS_INC
(
xs_dir_create
);
/*
/*
* Fill in the arg structure for this request.
* Fill in the arg structure for this request.
*/
*/
...
@@ -367,7 +367,7 @@ xfs_dir_removename(xfs_trans_t *trans, xfs_inode_t *dp, char *name,
...
@@ -367,7 +367,7 @@ xfs_dir_removename(xfs_trans_t *trans, xfs_inode_t *dp, char *name,
int
count
,
totallen
,
newsize
,
retval
;
int
count
,
totallen
,
newsize
,
retval
;
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_remove
);
XFS_STATS_INC
(
xs_dir_remove
);
/*
/*
* Fill in the arg structure for this request.
* Fill in the arg structure for this request.
*/
*/
...
@@ -411,7 +411,7 @@ xfs_dir_lookup(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen,
...
@@ -411,7 +411,7 @@ xfs_dir_lookup(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen,
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_lookup
);
XFS_STATS_INC
(
xs_dir_lookup
);
/*
/*
* Fill in the arg structure for this request.
* Fill in the arg structure for this request.
*/
*/
...
@@ -454,7 +454,7 @@ xfs_dir_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio, int *eofp)
...
@@ -454,7 +454,7 @@ xfs_dir_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio, int *eofp)
int
alignment
,
retval
;
int
alignment
,
retval
;
xfs_dir_put_t
put
;
xfs_dir_put_t
put
;
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_getdents
);
XFS_STATS_INC
(
xs_dir_getdents
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
/*
/*
...
...
fs/xfs/xfs_dir2.c
View file @
76897d18
...
@@ -212,7 +212,7 @@ xfs_dir2_createname(
...
@@ -212,7 +212,7 @@ xfs_dir2_createname(
if
((
rval
=
xfs_dir_ino_validate
(
tp
->
t_mountp
,
inum
)))
{
if
((
rval
=
xfs_dir_ino_validate
(
tp
->
t_mountp
,
inum
)))
{
return
rval
;
return
rval
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_create
);
XFS_STATS_INC
(
xs_dir_create
);
/*
/*
* Fill in the arg structure for this request.
* Fill in the arg structure for this request.
*/
*/
...
@@ -262,7 +262,7 @@ xfs_dir2_lookup(
...
@@ -262,7 +262,7 @@ xfs_dir2_lookup(
int
v
;
/* type-checking value */
int
v
;
/* type-checking value */
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_lookup
);
XFS_STATS_INC
(
xs_dir_lookup
);
/*
/*
* Fill in the arg structure for this request.
* Fill in the arg structure for this request.
...
@@ -320,7 +320,7 @@ xfs_dir2_removename(
...
@@ -320,7 +320,7 @@ xfs_dir2_removename(
int
v
;
/* type-checking value */
int
v
;
/* type-checking value */
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_remove
);
XFS_STATS_INC
(
xs_dir_remove
);
/*
/*
* Fill in the arg structure for this request.
* Fill in the arg structure for this request.
*/
*/
...
@@ -370,7 +370,7 @@ xfs_dir2_getdents(
...
@@ -370,7 +370,7 @@ xfs_dir2_getdents(
int
v
;
/* type-checking value */
int
v
;
/* type-checking value */
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
XFS_STATS_INC
(
x
fsstats
.
x
s_dir_getdents
);
XFS_STATS_INC
(
xs_dir_getdents
);
/*
/*
* If our caller has given us a single contiguous aligned memory buffer,
* If our caller has given us a single contiguous aligned memory buffer,
* just work directly within that buffer. If it's in user memory,
* just work directly within that buffer. If it's in user memory,
...
...
fs/xfs/xfs_iget.c
View file @
76897d18
...
@@ -204,7 +204,7 @@ xfs_iget_core(
...
@@ -204,7 +204,7 @@ xfs_iget_core(
if
(
ip
->
i_flags
&
XFS_IRECLAIM
)
{
if
(
ip
->
i_flags
&
XFS_IRECLAIM
)
{
read_unlock
(
&
ih
->
ih_lock
);
read_unlock
(
&
ih
->
ih_lock
);
delay
(
1
);
delay
(
1
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_frecycle
);
XFS_STATS_INC
(
xs_ig_frecycle
);
goto
again
;
goto
again
;
}
}
...
@@ -212,7 +212,7 @@ xfs_iget_core(
...
@@ -212,7 +212,7 @@ xfs_iget_core(
vn_trace_exit
(
vp
,
"xfs_iget.alloc"
,
vn_trace_exit
(
vp
,
"xfs_iget.alloc"
,
(
inst_t
*
)
__return_address
);
(
inst_t
*
)
__return_address
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_found
);
XFS_STATS_INC
(
xs_ig_found
);
ip
->
i_flags
&=
~
XFS_IRECLAIMABLE
;
ip
->
i_flags
&=
~
XFS_IRECLAIMABLE
;
read_unlock
(
&
ih
->
ih_lock
);
read_unlock
(
&
ih
->
ih_lock
);
...
@@ -232,7 +232,7 @@ xfs_iget_core(
...
@@ -232,7 +232,7 @@ xfs_iget_core(
if
(
inode
->
i_state
&
(
I_FREEING
|
I_CLEAR
))
{
if
(
inode
->
i_state
&
(
I_FREEING
|
I_CLEAR
))
{
read_unlock
(
&
ih
->
ih_lock
);
read_unlock
(
&
ih
->
ih_lock
);
delay
(
1
);
delay
(
1
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_frecycle
);
XFS_STATS_INC
(
xs_ig_frecycle
);
goto
again
;
goto
again
;
}
}
...
@@ -247,7 +247,7 @@ xfs_iget_core(
...
@@ -247,7 +247,7 @@ xfs_iget_core(
read_unlock
(
&
ih
->
ih_lock
);
read_unlock
(
&
ih
->
ih_lock
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_found
);
XFS_STATS_INC
(
xs_ig_found
);
finish_inode:
finish_inode:
if
(
lock_flags
!=
0
)
{
if
(
lock_flags
!=
0
)
{
...
@@ -269,7 +269,7 @@ xfs_iget_core(
...
@@ -269,7 +269,7 @@ xfs_iget_core(
* Inode cache miss: save the hash chain version stamp and unlock
* Inode cache miss: save the hash chain version stamp and unlock
* the chain, so we don't deadlock in vn_alloc.
* the chain, so we don't deadlock in vn_alloc.
*/
*/
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_missed
);
XFS_STATS_INC
(
xs_ig_missed
);
version
=
ih
->
ih_version
;
version
=
ih
->
ih_version
;
...
@@ -305,7 +305,7 @@ xfs_iget_core(
...
@@ -305,7 +305,7 @@ xfs_iget_core(
write_unlock
(
&
ih
->
ih_lock
);
write_unlock
(
&
ih
->
ih_lock
);
xfs_idestroy
(
ip
);
xfs_idestroy
(
ip
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_dup
);
XFS_STATS_INC
(
xs_ig_dup
);
goto
again
;
goto
again
;
}
}
}
}
...
@@ -442,7 +442,7 @@ xfs_iget(
...
@@ -442,7 +442,7 @@ xfs_iget(
int
error
;
int
error
;
retry:
retry:
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_attempts
);
XFS_STATS_INC
(
xs_ig_attempts
);
if
((
inode
=
iget_locked
(
XFS_MTOVFS
(
mp
)
->
vfs_super
,
ino
)))
{
if
((
inode
=
iget_locked
(
XFS_MTOVFS
(
mp
)
->
vfs_super
,
ino
)))
{
bhv_desc_t
*
bdp
;
bhv_desc_t
*
bdp
;
...
@@ -475,7 +475,7 @@ xfs_iget(
...
@@ -475,7 +475,7 @@ xfs_iget(
bdp
=
vn_bhv_lookup
(
VN_BHV_HEAD
(
vp
),
&
xfs_vnodeops
);
bdp
=
vn_bhv_lookup
(
VN_BHV_HEAD
(
vp
),
&
xfs_vnodeops
);
if
(
bdp
==
NULL
)
{
if
(
bdp
==
NULL
)
{
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_dup
);
XFS_STATS_INC
(
xs_ig_dup
);
goto
inode_allocate
;
goto
inode_allocate
;
}
}
ip
=
XFS_BHVTOI
(
bdp
);
ip
=
XFS_BHVTOI
(
bdp
);
...
@@ -484,7 +484,7 @@ xfs_iget(
...
@@ -484,7 +484,7 @@ xfs_iget(
newnode
=
(
ip
->
i_d
.
di_mode
==
0
);
newnode
=
(
ip
->
i_d
.
di_mode
==
0
);
if
(
newnode
)
if
(
newnode
)
xfs_iocore_inode_reinit
(
ip
);
xfs_iocore_inode_reinit
(
ip
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_found
);
XFS_STATS_INC
(
xs_ig_found
);
*
ipp
=
ip
;
*
ipp
=
ip
;
error
=
0
;
error
=
0
;
}
}
...
@@ -604,7 +604,7 @@ xfs_ireclaim(xfs_inode_t *ip)
...
@@ -604,7 +604,7 @@ xfs_ireclaim(xfs_inode_t *ip)
/*
/*
* Remove from old hash list and mount list.
* Remove from old hash list and mount list.
*/
*/
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_reclaims
);
XFS_STATS_INC
(
xs_ig_reclaims
);
xfs_iextract
(
ip
);
xfs_iextract
(
ip
);
...
...
fs/xfs/xfs_inode.c
View file @
76897d18
...
@@ -2888,7 +2888,7 @@ xfs_iflush(
...
@@ -2888,7 +2888,7 @@ xfs_iflush(
enum
{
INT_DELWRI
=
(
1
<<
0
),
INT_ASYNC
=
(
1
<<
1
)
};
enum
{
INT_DELWRI
=
(
1
<<
0
),
INT_ASYNC
=
(
1
<<
1
)
};
SPLDECL
(
s
);
SPLDECL
(
s
);
XFS_STATS_INC
(
x
fsstats
.
x
s_iflush_count
);
XFS_STATS_INC
(
xs_iflush_count
);
ASSERT
(
ismrlocked
(
&
ip
->
i_lock
,
MR_UPDATE
|
MR_ACCESS
));
ASSERT
(
ismrlocked
(
&
ip
->
i_lock
,
MR_UPDATE
|
MR_ACCESS
));
ASSERT
(
valusema
(
&
ip
->
i_flock
)
<=
0
);
ASSERT
(
valusema
(
&
ip
->
i_flock
)
<=
0
);
...
@@ -3061,8 +3061,8 @@ xfs_iflush(
...
@@ -3061,8 +3061,8 @@ xfs_iflush(
mutex_spinunlock
(
&
ch
->
ch_lock
,
s
);
mutex_spinunlock
(
&
ch
->
ch_lock
,
s
);
if
(
clcount
)
{
if
(
clcount
)
{
XFS_STATS_INC
(
x
fsstats
.
x
s_icluster_flushcnt
);
XFS_STATS_INC
(
xs_icluster_flushcnt
);
XFS_STATS_ADD
(
x
fsstats
.
x
s_icluster_flushinode
,
clcount
);
XFS_STATS_ADD
(
xs_icluster_flushinode
,
clcount
);
}
}
/*
/*
...
...
fs/xfs/xfs_log.c
View file @
76897d18
...
@@ -345,7 +345,7 @@ xfs_log_force(xfs_mount_t *mp,
...
@@ -345,7 +345,7 @@ xfs_log_force(xfs_mount_t *mp,
ASSERT
(
flags
&
XFS_LOG_FORCE
);
ASSERT
(
flags
&
XFS_LOG_FORCE
);
XFS_STATS_INC
(
x
fsstats
.
x
s_log_force
);
XFS_STATS_INC
(
xs_log_force
);
if
((
log
->
l_flags
&
XLOG_IO_ERROR
)
==
0
)
{
if
((
log
->
l_flags
&
XLOG_IO_ERROR
)
==
0
)
{
if
(
lsn
==
0
)
if
(
lsn
==
0
)
...
@@ -446,7 +446,7 @@ xfs_log_reserve(xfs_mount_t *mp,
...
@@ -446,7 +446,7 @@ xfs_log_reserve(xfs_mount_t *mp,
if
(
XLOG_FORCED_SHUTDOWN
(
log
))
if
(
XLOG_FORCED_SHUTDOWN
(
log
))
return
XFS_ERROR
(
EIO
);
return
XFS_ERROR
(
EIO
);
XFS_STATS_INC
(
x
fsstats
.
x
s_try_logspace
);
XFS_STATS_INC
(
xs_try_logspace
);
if
(
*
ticket
!=
NULL
)
{
if
(
*
ticket
!=
NULL
)
{
ASSERT
(
flags
&
XFS_LOG_PERM_RESERV
);
ASSERT
(
flags
&
XFS_LOG_PERM_RESERV
);
...
@@ -1428,7 +1428,7 @@ xlog_sync(xlog_t *log,
...
@@ -1428,7 +1428,7 @@ xlog_sync(xlog_t *log,
int
split
=
0
;
/* split write into two regions */
int
split
=
0
;
/* split write into two regions */
int
error
;
int
error
;
XFS_STATS_INC
(
x
fsstats
.
x
s_log_writes
);
XFS_STATS_INC
(
xs_log_writes
);
ASSERT
(
iclog
->
ic_refcnt
==
0
);
ASSERT
(
iclog
->
ic_refcnt
==
0
);
/* Round out the log write size */
/* Round out the log write size */
...
@@ -1477,7 +1477,7 @@ xlog_sync(xlog_t *log,
...
@@ -1477,7 +1477,7 @@ xlog_sync(xlog_t *log,
/* Add for LR header */
/* Add for LR header */
count
+=
log
->
l_iclog_hsize
;
count
+=
log
->
l_iclog_hsize
;
XFS_STATS_ADD
(
x
fsstats
.
x
s_log_blocks
,
BTOBB
(
count
));
XFS_STATS_ADD
(
xs_log_blocks
,
BTOBB
(
count
));
/* Do we need to split this write into 2 parts? */
/* Do we need to split this write into 2 parts? */
if
(
XFS_BUF_ADDR
(
bp
)
+
BTOBB
(
count
)
>
log
->
l_logBBsize
)
{
if
(
XFS_BUF_ADDR
(
bp
)
+
BTOBB
(
count
)
>
log
->
l_logBBsize
)
{
...
@@ -2308,7 +2308,7 @@ xlog_state_get_iclog_space(xlog_t *log,
...
@@ -2308,7 +2308,7 @@ xlog_state_get_iclog_space(xlog_t *log,
log
->
l_flushcnt
++
;
log
->
l_flushcnt
++
;
LOG_UNLOCK
(
log
,
s
);
LOG_UNLOCK
(
log
,
s
);
xlog_trace_iclog
(
iclog
,
XLOG_TRACE_SLEEP_FLUSH
);
xlog_trace_iclog
(
iclog
,
XLOG_TRACE_SLEEP_FLUSH
);
XFS_STATS_INC
(
x
fsstats
.
x
s_log_noiclogs
);
XFS_STATS_INC
(
xs_log_noiclogs
);
/* Ensure that log writes happen */
/* Ensure that log writes happen */
psema
(
&
log
->
l_flushsema
,
PINOD
);
psema
(
&
log
->
l_flushsema
,
PINOD
);
goto
restart
;
goto
restart
;
...
@@ -2421,7 +2421,7 @@ xlog_grant_log_space(xlog_t *log,
...
@@ -2421,7 +2421,7 @@ xlog_grant_log_space(xlog_t *log,
if
(
XLOG_FORCED_SHUTDOWN
(
log
))
if
(
XLOG_FORCED_SHUTDOWN
(
log
))
goto
error_return
;
goto
error_return
;
XFS_STATS_INC
(
x
fsstats
.
x
s_sleep_logspace
);
XFS_STATS_INC
(
xs_sleep_logspace
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
/*
/*
* If we got an error, and the filesystem is shutting down,
* If we got an error, and the filesystem is shutting down,
...
@@ -2447,7 +2447,7 @@ xlog_grant_log_space(xlog_t *log,
...
@@ -2447,7 +2447,7 @@ xlog_grant_log_space(xlog_t *log,
XLOG_INS_TICKETQ
(
log
->
l_reserve_headq
,
tic
);
XLOG_INS_TICKETQ
(
log
->
l_reserve_headq
,
tic
);
xlog_trace_loggrant
(
log
,
tic
,
xlog_trace_loggrant
(
log
,
tic
,
"xlog_grant_log_space: sleep 2"
);
"xlog_grant_log_space: sleep 2"
);
XFS_STATS_INC
(
x
fsstats
.
x
s_sleep_logspace
);
XFS_STATS_INC
(
xs_sleep_logspace
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
if
(
XLOG_FORCED_SHUTDOWN
(
log
))
{
if
(
XLOG_FORCED_SHUTDOWN
(
log
))
{
...
@@ -2558,7 +2558,7 @@ xlog_regrant_write_log_space(xlog_t *log,
...
@@ -2558,7 +2558,7 @@ xlog_regrant_write_log_space(xlog_t *log,
xlog_trace_loggrant
(
log
,
tic
,
xlog_trace_loggrant
(
log
,
tic
,
"xlog_regrant_write_log_space: sleep 1"
);
"xlog_regrant_write_log_space: sleep 1"
);
XFS_STATS_INC
(
x
fsstats
.
x
s_sleep_logspace
);
XFS_STATS_INC
(
xs_sleep_logspace
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
&
log
->
l_grant_lock
,
s
);
...
@@ -2587,7 +2587,7 @@ xlog_regrant_write_log_space(xlog_t *log,
...
@@ -2587,7 +2587,7 @@ xlog_regrant_write_log_space(xlog_t *log,
if
(
free_bytes
<
need_bytes
)
{
if
(
free_bytes
<
need_bytes
)
{
if
((
tic
->
t_flags
&
XLOG_TIC_IN_Q
)
==
0
)
if
((
tic
->
t_flags
&
XLOG_TIC_IN_Q
)
==
0
)
XLOG_INS_TICKETQ
(
log
->
l_write_headq
,
tic
);
XLOG_INS_TICKETQ
(
log
->
l_write_headq
,
tic
);
XFS_STATS_INC
(
x
fsstats
.
x
s_sleep_logspace
);
XFS_STATS_INC
(
xs_sleep_logspace
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
sv_wait
(
&
tic
->
t_sema
,
PINOD
|
PLTWAIT
,
&
log
->
l_grant_lock
,
s
);
/* If we're shutting down, this tic is already off the queue */
/* If we're shutting down, this tic is already off the queue */
...
@@ -2952,7 +2952,7 @@ xlog_state_sync_all(xlog_t *log, uint flags)
...
@@ -2952,7 +2952,7 @@ xlog_state_sync_all(xlog_t *log, uint flags)
LOG_UNLOCK
(
log
,
s
);
LOG_UNLOCK
(
log
,
s
);
return
XFS_ERROR
(
EIO
);
return
XFS_ERROR
(
EIO
);
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_log_force_sleep
);
XFS_STATS_INC
(
xs_log_force_sleep
);
sv_wait
(
&
iclog
->
ic_forcesema
,
PINOD
,
&
log
->
l_icloglock
,
s
);
sv_wait
(
&
iclog
->
ic_forcesema
,
PINOD
,
&
log
->
l_icloglock
,
s
);
/*
/*
* No need to grab the log lock here since we're
* No need to grab the log lock here since we're
...
@@ -3035,7 +3035,7 @@ xlog_state_sync(xlog_t *log,
...
@@ -3035,7 +3035,7 @@ xlog_state_sync(xlog_t *log,
(
iclog
->
ic_prev
->
ic_state
&
(
XLOG_STATE_WANT_SYNC
|
(
iclog
->
ic_prev
->
ic_state
&
(
XLOG_STATE_WANT_SYNC
|
XLOG_STATE_SYNCING
)))
{
XLOG_STATE_SYNCING
)))
{
ASSERT
(
!
(
iclog
->
ic_state
&
XLOG_STATE_IOERROR
));
ASSERT
(
!
(
iclog
->
ic_state
&
XLOG_STATE_IOERROR
));
XFS_STATS_INC
(
x
fsstats
.
x
s_log_force_sleep
);
XFS_STATS_INC
(
xs_log_force_sleep
);
sv_wait
(
&
iclog
->
ic_prev
->
ic_writesema
,
PSWP
,
sv_wait
(
&
iclog
->
ic_prev
->
ic_writesema
,
PSWP
,
&
log
->
l_icloglock
,
s
);
&
log
->
l_icloglock
,
s
);
already_slept
=
1
;
already_slept
=
1
;
...
@@ -3061,7 +3061,7 @@ xlog_state_sync(xlog_t *log,
...
@@ -3061,7 +3061,7 @@ xlog_state_sync(xlog_t *log,
LOG_UNLOCK
(
log
,
s
);
LOG_UNLOCK
(
log
,
s
);
return
XFS_ERROR
(
EIO
);
return
XFS_ERROR
(
EIO
);
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_log_force_sleep
);
XFS_STATS_INC
(
xs_log_force_sleep
);
sv_wait
(
&
iclog
->
ic_forcesema
,
PSWP
,
&
log
->
l_icloglock
,
s
);
sv_wait
(
&
iclog
->
ic_forcesema
,
PSWP
,
&
log
->
l_icloglock
,
s
);
/*
/*
* No need to grab the log lock here since we're
* No need to grab the log lock here since we're
...
...
fs/xfs/xfs_trans.c
View file @
76897d18
...
@@ -739,7 +739,7 @@ xfs_trans_commit(
...
@@ -739,7 +739,7 @@ xfs_trans_commit(
xfs_trans_free_items
(
tp
,
shutdown
?
XFS_TRANS_ABORT
:
0
);
xfs_trans_free_items
(
tp
,
shutdown
?
XFS_TRANS_ABORT
:
0
);
xfs_trans_free_busy
(
tp
);
xfs_trans_free_busy
(
tp
);
xfs_trans_free
(
tp
);
xfs_trans_free
(
tp
);
XFS_STATS_INC
(
x
fsstats
.
x
s_trans_empty
);
XFS_STATS_INC
(
xs_trans_empty
);
if
(
commit_lsn_p
)
if
(
commit_lsn_p
)
*
commit_lsn_p
=
commit_lsn
;
*
commit_lsn_p
=
commit_lsn
;
return
(
shutdown
);
return
(
shutdown
);
...
@@ -895,9 +895,9 @@ xfs_trans_commit(
...
@@ -895,9 +895,9 @@ xfs_trans_commit(
if
(
!
error
)
if
(
!
error
)
error
=
xfs_log_force
(
mp
,
commit_lsn
,
error
=
xfs_log_force
(
mp
,
commit_lsn
,
XFS_LOG_FORCE
|
XFS_LOG_SYNC
);
XFS_LOG_FORCE
|
XFS_LOG_SYNC
);
XFS_STATS_INC
(
x
fsstats
.
x
s_trans_sync
);
XFS_STATS_INC
(
xs_trans_sync
);
}
else
{
}
else
{
XFS_STATS_INC
(
x
fsstats
.
x
s_trans_async
);
XFS_STATS_INC
(
xs_trans_async
);
}
}
return
(
error
);
return
(
error
);
...
...
fs/xfs/xfs_trans_ail.c
View file @
76897d18
...
@@ -118,7 +118,7 @@ xfs_trans_push_ail(
...
@@ -118,7 +118,7 @@ xfs_trans_push_ail(
return
(
xfs_lsn_t
)
0
;
return
(
xfs_lsn_t
)
0
;
}
}
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail
);
XFS_STATS_INC
(
xs_push_ail
);
/*
/*
* While the item we are looking at is below the given threshold
* While the item we are looking at is below the given threshold
...
@@ -152,14 +152,14 @@ xfs_trans_push_ail(
...
@@ -152,14 +152,14 @@ xfs_trans_push_ail(
switch
(
lock_result
)
{
switch
(
lock_result
)
{
case
XFS_ITEM_SUCCESS
:
case
XFS_ITEM_SUCCESS
:
AIL_UNLOCK
(
mp
,
s
);
AIL_UNLOCK
(
mp
,
s
);
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_success
);
XFS_STATS_INC
(
xs_push_ail_success
);
IOP_PUSH
(
lip
);
IOP_PUSH
(
lip
);
AIL_LOCK
(
mp
,
s
);
AIL_LOCK
(
mp
,
s
);
break
;
break
;
case
XFS_ITEM_PUSHBUF
:
case
XFS_ITEM_PUSHBUF
:
AIL_UNLOCK
(
mp
,
s
);
AIL_UNLOCK
(
mp
,
s
);
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_pushbuf
);
XFS_STATS_INC
(
xs_push_ail_pushbuf
);
#ifdef XFSRACEDEBUG
#ifdef XFSRACEDEBUG
delay_for_intr
();
delay_for_intr
();
delay
(
300
);
delay
(
300
);
...
@@ -171,16 +171,16 @@ xfs_trans_push_ail(
...
@@ -171,16 +171,16 @@ xfs_trans_push_ail(
break
;
break
;
case
XFS_ITEM_PINNED
:
case
XFS_ITEM_PINNED
:
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_pinned
);
XFS_STATS_INC
(
xs_push_ail_pinned
);
flush_log
=
1
;
flush_log
=
1
;
break
;
break
;
case
XFS_ITEM_LOCKED
:
case
XFS_ITEM_LOCKED
:
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_locked
);
XFS_STATS_INC
(
xs_push_ail_locked
);
break
;
break
;
case
XFS_ITEM_FLUSHING
:
case
XFS_ITEM_FLUSHING
:
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_flushing
);
XFS_STATS_INC
(
xs_push_ail_flushing
);
break
;
break
;
default:
default:
...
@@ -209,7 +209,7 @@ xfs_trans_push_ail(
...
@@ -209,7 +209,7 @@ xfs_trans_push_ail(
* move forward in the AIL.
* move forward in the AIL.
*/
*/
AIL_UNLOCK
(
mp
,
s
);
AIL_UNLOCK
(
mp
,
s
);
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_flush
);
XFS_STATS_INC
(
xs_push_ail_flush
);
xfs_log_force
(
mp
,
(
xfs_lsn_t
)
0
,
XFS_LOG_FORCE
);
xfs_log_force
(
mp
,
(
xfs_lsn_t
)
0
,
XFS_LOG_FORCE
);
AIL_LOCK
(
mp
,
s
);
AIL_LOCK
(
mp
,
s
);
}
}
...
@@ -428,7 +428,7 @@ xfs_trans_next_ail(
...
@@ -428,7 +428,7 @@ xfs_trans_next_ail(
nlip
=
xfs_ail_min
(
&
(
mp
->
m_ail
));
nlip
=
xfs_ail_min
(
&
(
mp
->
m_ail
));
*
gen
=
(
int
)
mp
->
m_ail_gen
;
*
gen
=
(
int
)
mp
->
m_ail_gen
;
if
(
restarts
!=
NULL
)
{
if
(
restarts
!=
NULL
)
{
XFS_STATS_INC
(
x
fsstats
.
x
s_push_ail_restarts
);
XFS_STATS_INC
(
xs_push_ail_restarts
);
(
*
restarts
)
++
;
(
*
restarts
)
++
;
}
}
}
}
...
...
fs/xfs/xfs_vnodeops.c
View file @
76897d18
...
@@ -891,7 +891,7 @@ xfs_setattr(
...
@@ -891,7 +891,7 @@ xfs_setattr(
if
(
timeflags
&&
!
(
flags
&
ATTR_DMI
))
if
(
timeflags
&&
!
(
flags
&
ATTR_DMI
))
xfs_ichgtime
(
ip
,
timeflags
);
xfs_ichgtime
(
ip
,
timeflags
);
XFS_STATS_INC
(
x
fsstats
.
x
s_ig_attrchg
);
XFS_STATS_INC
(
xs_ig_attrchg
);
/*
/*
* If this is a synchronous mount, make sure that the
* If this is a synchronous mount, make sure that the
...
...
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