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
ccf0f32a
Commit
ccf0f32a
authored
Feb 18, 2018
by
Theodore Ts'o
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ext4: add tracepoints for shutdown and file system errors
Signed-off-by:
Theodore Ts'o
<
tytso@mit.edu
>
parent
7928b2cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
fs/ext4/ioctl.c
fs/ext4/ioctl.c
+1
-0
fs/ext4/super.c
fs/ext4/super.c
+4
-0
include/trace/events/ext4.h
include/trace/events/ext4.h
+43
-0
No files found.
fs/ext4/ioctl.c
View file @
ccf0f32a
...
...
@@ -481,6 +481,7 @@ static int ext4_shutdown(struct super_block *sb, unsigned long arg)
return
0
;
ext4_msg
(
sb
,
KERN_ALERT
,
"shut down requested (%d)"
,
flags
);
trace_ext4_shutdown
(
sb
,
flags
);
switch
(
flags
)
{
case
EXT4_GOING_FLAGS_DEFAULT
:
...
...
fs/ext4/super.c
View file @
ccf0f32a
...
...
@@ -448,6 +448,7 @@ void __ext4_error(struct super_block *sb, const char *function,
if
(
unlikely
(
ext4_forced_shutdown
(
EXT4_SB
(
sb
))))
return
;
trace_ext4_error
(
sb
,
function
,
line
);
if
(
ext4_error_ratelimit
(
sb
))
{
va_start
(
args
,
fmt
);
vaf
.
fmt
=
fmt
;
...
...
@@ -472,6 +473,7 @@ void __ext4_error_inode(struct inode *inode, const char *function,
if
(
unlikely
(
ext4_forced_shutdown
(
EXT4_SB
(
inode
->
i_sb
))))
return
;
trace_ext4_error
(
inode
->
i_sb
,
function
,
line
);
es
->
s_last_error_ino
=
cpu_to_le32
(
inode
->
i_ino
);
es
->
s_last_error_block
=
cpu_to_le64
(
block
);
if
(
ext4_error_ratelimit
(
inode
->
i_sb
))
{
...
...
@@ -507,6 +509,7 @@ void __ext4_error_file(struct file *file, const char *function,
if
(
unlikely
(
ext4_forced_shutdown
(
EXT4_SB
(
inode
->
i_sb
))))
return
;
trace_ext4_error
(
inode
->
i_sb
,
function
,
line
);
es
=
EXT4_SB
(
inode
->
i_sb
)
->
s_es
;
es
->
s_last_error_ino
=
cpu_to_le32
(
inode
->
i_ino
);
if
(
ext4_error_ratelimit
(
inode
->
i_sb
))
{
...
...
@@ -719,6 +722,7 @@ __acquires(bitlock)
if
(
unlikely
(
ext4_forced_shutdown
(
EXT4_SB
(
sb
))))
return
;
trace_ext4_error
(
sb
,
function
,
line
);
es
->
s_last_error_ino
=
cpu_to_le32
(
ino
);
es
->
s_last_error_block
=
cpu_to_le64
(
block
);
__save_error_info
(
sb
,
function
,
line
);
...
...
include/trace/events/ext4.h
View file @
ccf0f32a
...
...
@@ -2585,6 +2585,49 @@ DEFINE_GETFSMAP_EVENT(ext4_getfsmap_low_key);
DEFINE_GETFSMAP_EVENT
(
ext4_getfsmap_high_key
);
DEFINE_GETFSMAP_EVENT
(
ext4_getfsmap_mapping
);
TRACE_EVENT
(
ext4_shutdown
,
TP_PROTO
(
struct
super_block
*
sb
,
unsigned
long
flags
),
TP_ARGS
(
sb
,
flags
),
TP_STRUCT__entry
(
__field
(
dev_t
,
dev
)
__field
(
unsigned
,
flags
)
),
TP_fast_assign
(
__entry
->
dev
=
sb
->
s_dev
;
__entry
->
flags
=
flags
;
),
TP_printk
(
"dev %d,%d flags %u"
,
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
__entry
->
flags
)
);
TRACE_EVENT
(
ext4_error
,
TP_PROTO
(
struct
super_block
*
sb
,
const
char
*
function
,
unsigned
int
line
),
TP_ARGS
(
sb
,
function
,
line
),
TP_STRUCT__entry
(
__field
(
dev_t
,
dev
)
__field
(
const
char
*
,
function
)
__field
(
unsigned
,
line
)
),
TP_fast_assign
(
__entry
->
dev
=
sb
->
s_dev
;
__entry
->
function
=
function
;
__entry
->
line
=
line
;
),
TP_printk
(
"dev %d,%d function %s line %u"
,
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
__entry
->
function
,
__entry
->
line
)
);
#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