mirror of https://gitee.com/openkylin/linux.git
f2fs: clean up bio cache trace
Trace info related to bio cache operation is out of format, clean up it. Before: <...>-28308 [002] .... 4781.052703: f2fs_submit_write_bio: dev = (251,1), WRITEWRITE_SYNC ^H, DATA, sector = 271424, size = 126976 <...>-28308 [002] .... 4781.052820: f2fs_submit_page_mbio: dev = (251,1), ino = 103, page_index = 0x1f, oldaddr = 0xffffffff, newaddr = 0x84a7 rw = WRITEWRITE_SYNCi ^H, type = DATA kworker/u8:2-29988 [001] .... 5549.293877: f2fs_submit_page_mbio: dev = (251,1), ino = 91, page_index = 0xd, oldaddr = 0xffffffff, newaddr = 0x782f rw = WRITE0x0i ^H type = DATA After: kworker/u8:2-8678 [000] .... 7945.124459: f2fs_submit_write_bio: dev = (251,1), rw = WRITE_SYNC, DATA, sector = 74080, size = 53248 kworker/u8:2-8678 [000] .... 7945.124551: f2fs_submit_page_mbio: dev = (251,1), ino = 11, page_index = 0xec, oldaddr = 0xffffffff, newaddr = 0x243a, rw = WRITE, type = DATA Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
3e025740b9
commit
44819a76d1
|
@ -58,16 +58,12 @@ TRACE_DEFINE_ENUM(CP_DISCARD);
|
||||||
#define F2FS_BIO_FLAG_MASK(t) (t & (REQ_RAHEAD | WRITE_FLUSH_FUA))
|
#define F2FS_BIO_FLAG_MASK(t) (t & (REQ_RAHEAD | WRITE_FLUSH_FUA))
|
||||||
#define F2FS_BIO_EXTRA_MASK(t) (t & (REQ_META | REQ_PRIO))
|
#define F2FS_BIO_EXTRA_MASK(t) (t & (REQ_META | REQ_PRIO))
|
||||||
|
|
||||||
#define show_bio_type(op, op_flags) show_bio_op(op), \
|
#define show_bio_type(op_flags) show_bio_op_flags(op_flags), \
|
||||||
show_bio_op_flags(op_flags), show_bio_extra(op_flags)
|
show_bio_extra(op_flags)
|
||||||
|
|
||||||
#define show_bio_op(op) \
|
|
||||||
__print_symbolic(op, \
|
|
||||||
{ READ, "READ" }, \
|
|
||||||
{ WRITE, "WRITE" })
|
|
||||||
|
|
||||||
#define show_bio_op_flags(flags) \
|
#define show_bio_op_flags(flags) \
|
||||||
__print_symbolic(F2FS_BIO_FLAG_MASK(flags), \
|
__print_symbolic(F2FS_BIO_FLAG_MASK(flags), \
|
||||||
|
{ 0, "WRITE" }, \
|
||||||
{ REQ_RAHEAD, "READAHEAD" }, \
|
{ REQ_RAHEAD, "READAHEAD" }, \
|
||||||
{ READ_SYNC, "READ_SYNC" }, \
|
{ READ_SYNC, "READ_SYNC" }, \
|
||||||
{ WRITE_SYNC, "WRITE_SYNC" }, \
|
{ WRITE_SYNC, "WRITE_SYNC" }, \
|
||||||
|
@ -754,12 +750,12 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
|
TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
|
||||||
"oldaddr = 0x%llx, newaddr = 0x%llx rw = %s%si%s, type = %s",
|
"oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s%s, type = %s",
|
||||||
show_dev_ino(__entry),
|
show_dev_ino(__entry),
|
||||||
(unsigned long)__entry->index,
|
(unsigned long)__entry->index,
|
||||||
(unsigned long long)__entry->old_blkaddr,
|
(unsigned long long)__entry->old_blkaddr,
|
||||||
(unsigned long long)__entry->new_blkaddr,
|
(unsigned long long)__entry->new_blkaddr,
|
||||||
show_bio_type(__entry->op, __entry->op_flags),
|
show_bio_type(__entry->op_flags),
|
||||||
show_block_type(__entry->type))
|
show_block_type(__entry->type))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -806,9 +802,9 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
|
||||||
__entry->size = bio->bi_iter.bi_size;
|
__entry->size = bio->bi_iter.bi_size;
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("dev = (%d,%d), %s%s%s, %s, sector = %lld, size = %u",
|
TP_printk("dev = (%d,%d), rw = %s%s, %s, sector = %lld, size = %u",
|
||||||
show_dev(__entry),
|
show_dev(__entry),
|
||||||
show_bio_type(__entry->op, __entry->op_flags),
|
show_bio_type(__entry->op_flags),
|
||||||
show_block_type(__entry->type),
|
show_block_type(__entry->type),
|
||||||
(unsigned long long)__entry->sector,
|
(unsigned long long)__entry->sector,
|
||||||
__entry->size)
|
__entry->size)
|
||||||
|
|
Loading…
Reference in New Issue