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
fb40ba0d
Commit
fb40ba0d
authored
Sep 16, 2009
by
Theodore Ts'o
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ext4: Add a tracepoint for ext4_alloc_da_blocks()
Signed-off-by:
"Theodore Ts'o"
<
tytso@mit.edu
>
parent
1b9c12f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
fs/ext4/inode.c
fs/ext4/inode.c
+2
-0
include/trace/events/ext4.h
include/trace/events/ext4.h
+27
-0
No files found.
fs/ext4/inode.c
View file @
fb40ba0d
...
...
@@ -3128,6 +3128,8 @@ static void ext4_da_invalidatepage(struct page *page, unsigned long offset)
*/
int
ext4_alloc_da_blocks
(
struct
inode
*
inode
)
{
trace_ext4_alloc_da_blocks
(
inode
);
if
(
!
EXT4_I
(
inode
)
->
i_reserved_data_blocks
&&
!
EXT4_I
(
inode
)
->
i_reserved_meta_blocks
)
return
0
;
...
...
include/trace/events/ext4.h
View file @
fb40ba0d
...
...
@@ -10,6 +10,9 @@
struct
ext4_allocation_context
;
struct
ext4_allocation_request
;
struct
ext4_prealloc_space
;
struct
ext4_inode_info
;
#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
TRACE_EVENT
(
ext4_free_inode
,
TP_PROTO
(
struct
inode
*
inode
),
...
...
@@ -710,6 +713,30 @@ TRACE_EVENT(ext4_sync_fs,
__entry
->
wait
)
);
TRACE_EVENT
(
ext4_alloc_da_blocks
,
TP_PROTO
(
struct
inode
*
inode
),
TP_ARGS
(
inode
),
TP_STRUCT__entry
(
__field
(
dev_t
,
dev
)
__field
(
ino_t
,
ino
)
__field
(
unsigned
int
,
data_blocks
)
__field
(
unsigned
int
,
meta_blocks
)
),
TP_fast_assign
(
__entry
->
dev
=
inode
->
i_sb
->
s_dev
;
__entry
->
ino
=
inode
->
i_ino
;
__entry
->
data_blocks
=
EXT4_I
(
inode
)
->
i_reserved_data_blocks
;
__entry
->
meta_blocks
=
EXT4_I
(
inode
)
->
i_reserved_meta_blocks
;
),
TP_printk
(
"dev %s ino %lu data_blocks %u meta_blocks %u"
,
jbd2_dev_to_name
(
__entry
->
dev
),
(
unsigned
long
)
__entry
->
ino
,
__entry
->
data_blocks
,
__entry
->
meta_blocks
)
);
#endif
/* _TRACE_EXT4_H */
/* This part must be outside protection */
...
...
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