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
8ce67cb0
Commit
8ce67cb0
authored
Mar 17, 2015
by
Jaegeuk Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
f2fs: add some tracepoints to debug volatile and atomic writes
Signed-off-by:
Jaegeuk Kim
<
jaegeuk@kernel.org
>
parent
3c6c2beb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 deletion
+36
-1
fs/f2fs/data.c
fs/f2fs/data.c
+2
-0
fs/f2fs/f2fs.h
fs/f2fs/f2fs.h
+4
-0
fs/f2fs/segment.c
fs/f2fs/segment.c
+4
-0
include/trace/events/f2fs.h
include/trace/events/f2fs.h
+26
-1
No files found.
fs/f2fs/data.c
View file @
8ce67cb0
...
...
@@ -1287,9 +1287,11 @@ int do_write_data_page(struct page *page, struct f2fs_io_info *fio)
need_inplace_update
(
inode
)))
{
rewrite_data_page
(
page
,
fio
);
set_inode_flag
(
F2FS_I
(
inode
),
FI_UPDATE_WRITE
);
trace_f2fs_do_write_data_page
(
page
,
IPU
);
}
else
{
write_data_page
(
page
,
&
dn
,
fio
);
f2fs_update_extent_cache
(
&
dn
);
trace_f2fs_do_write_data_page
(
page
,
OPU
);
set_inode_flag
(
F2FS_I
(
inode
),
FI_APPEND_WRITE
);
if
(
page
->
index
==
0
)
set_inode_flag
(
F2FS_I
(
inode
),
FI_FIRST_BLOCK_WRITTEN
);
...
...
fs/f2fs/f2fs.h
View file @
8ce67cb0
...
...
@@ -556,6 +556,10 @@ enum page_type {
META
,
NR_PAGE_TYPE
,
META_FLUSH
,
INMEM
,
/* the below types are used by tracepoints only. */
INMEM_DROP
,
IPU
,
OPU
,
};
struct
f2fs_io_info
{
...
...
fs/f2fs/segment.c
View file @
8ce67cb0
...
...
@@ -205,6 +205,8 @@ void register_inmem_page(struct inode *inode, struct page *page)
list_add_tail
(
&
new
->
list
,
&
fi
->
inmem_pages
);
inc_page_count
(
F2FS_I_SB
(
inode
),
F2FS_INMEM_PAGES
);
mutex_unlock
(
&
fi
->
inmem_lock
);
trace_f2fs_register_inmem_page
(
page
,
INMEM
);
}
void
commit_inmem_pages
(
struct
inode
*
inode
,
bool
abort
)
...
...
@@ -238,11 +240,13 @@ void commit_inmem_pages(struct inode *inode, bool abort)
f2fs_wait_on_page_writeback
(
cur
->
page
,
DATA
);
if
(
clear_page_dirty_for_io
(
cur
->
page
))
inode_dec_dirty_pages
(
inode
);
trace_f2fs_commit_inmem_page
(
cur
->
page
,
INMEM
);
do_write_data_page
(
cur
->
page
,
&
fio
);
submit_bio
=
true
;
}
f2fs_put_page
(
cur
->
page
,
1
);
}
else
{
trace_f2fs_commit_inmem_page
(
cur
->
page
,
INMEM_DROP
);
put_page
(
cur
->
page
);
}
radix_tree_delete
(
&
fi
->
inmem_root
,
cur
->
page
->
index
);
...
...
include/trace/events/f2fs.h
View file @
8ce67cb0
...
...
@@ -14,7 +14,11 @@
{ NODE, "NODE" }, \
{ DATA, "DATA" }, \
{ META, "META" }, \
{ META_FLUSH, "META_FLUSH" })
{ META_FLUSH, "META_FLUSH" }, \
{ INMEM, "INMEM" }, \
{ INMEM_DROP, "INMEM_DROP" }, \
{ IPU, "IN-PLACE" }, \
{ OPU, "OUT-OF-PLACE" })
#define F2FS_BIO_MASK(t) (t & (READA | WRITE_FLUSH_FUA))
#define F2FS_BIO_EXTRA_MASK(t) (t & (REQ_META | REQ_PRIO))
...
...
@@ -854,6 +858,13 @@ DEFINE_EVENT(f2fs__page, f2fs_writepage,
TP_ARGS
(
page
,
type
)
);
DEFINE_EVENT
(
f2fs__page
,
f2fs_do_write_data_page
,
TP_PROTO
(
struct
page
*
page
,
int
type
),
TP_ARGS
(
page
,
type
)
);
DEFINE_EVENT
(
f2fs__page
,
f2fs_readpage
,
TP_PROTO
(
struct
page
*
page
,
int
type
),
...
...
@@ -875,6 +886,20 @@ DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite,
TP_ARGS
(
page
,
type
)
);
DEFINE_EVENT
(
f2fs__page
,
f2fs_register_inmem_page
,
TP_PROTO
(
struct
page
*
page
,
int
type
),
TP_ARGS
(
page
,
type
)
);
DEFINE_EVENT
(
f2fs__page
,
f2fs_commit_inmem_page
,
TP_PROTO
(
struct
page
*
page
,
int
type
),
TP_ARGS
(
page
,
type
)
);
TRACE_EVENT
(
f2fs_writepages
,
TP_PROTO
(
struct
inode
*
inode
,
struct
writeback_control
*
wbc
,
int
type
),
...
...
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