2013-04-19 20:28:40 +04:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM f2fs
|
|
|
|
|
|
|
|
#if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_F2FS_H
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
#define show_dev(dev) MAJOR(dev), MINOR(dev)
|
|
|
|
#define show_dev_ino(entry) show_dev(entry->dev), (unsigned long)entry->ino
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(NODE);
|
|
|
|
TRACE_DEFINE_ENUM(DATA);
|
|
|
|
TRACE_DEFINE_ENUM(META);
|
|
|
|
TRACE_DEFINE_ENUM(META_FLUSH);
|
2015-04-23 02:07:38 +03:00
|
|
|
TRACE_DEFINE_ENUM(INMEM);
|
|
|
|
TRACE_DEFINE_ENUM(INMEM_DROP);
|
|
|
|
TRACE_DEFINE_ENUM(IPU);
|
|
|
|
TRACE_DEFINE_ENUM(OPU);
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(CURSEG_HOT_DATA);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_WARM_DATA);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_COLD_DATA);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_HOT_NODE);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_WARM_NODE);
|
|
|
|
TRACE_DEFINE_ENUM(CURSEG_COLD_NODE);
|
|
|
|
TRACE_DEFINE_ENUM(NO_CHECK_TYPE);
|
|
|
|
TRACE_DEFINE_ENUM(GC_GREEDY);
|
|
|
|
TRACE_DEFINE_ENUM(GC_CB);
|
|
|
|
TRACE_DEFINE_ENUM(FG_GC);
|
|
|
|
TRACE_DEFINE_ENUM(BG_GC);
|
|
|
|
TRACE_DEFINE_ENUM(LFS);
|
|
|
|
TRACE_DEFINE_ENUM(SSR);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_RAHEAD);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_SYNC);
|
2016-11-01 16:40:09 +03:00
|
|
|
TRACE_DEFINE_ENUM(__REQ_IDLE);
|
2016-06-05 22:32:25 +03:00
|
|
|
TRACE_DEFINE_ENUM(__REQ_PREFLUSH);
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(__REQ_FUA);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_PRIO);
|
|
|
|
TRACE_DEFINE_ENUM(__REQ_META);
|
|
|
|
TRACE_DEFINE_ENUM(CP_UMOUNT);
|
|
|
|
TRACE_DEFINE_ENUM(CP_FASTBOOT);
|
|
|
|
TRACE_DEFINE_ENUM(CP_SYNC);
|
2015-04-23 02:07:38 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_RECOVERY);
|
2015-03-27 23:18:07 +03:00
|
|
|
TRACE_DEFINE_ENUM(CP_DISCARD);
|
|
|
|
|
2013-04-23 12:51:43 +04:00
|
|
|
#define show_block_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ NODE, "NODE" }, \
|
|
|
|
{ DATA, "DATA" }, \
|
|
|
|
{ META, "META" }, \
|
2015-03-18 03:58:08 +03:00
|
|
|
{ META_FLUSH, "META_FLUSH" }, \
|
|
|
|
{ INMEM, "INMEM" }, \
|
|
|
|
{ INMEM_DROP, "INMEM_DROP" }, \
|
f2fs: support revoking atomic written pages
f2fs support atomic write with following semantics:
1. open db file
2. ioctl start atomic write
3. (write db file) * n
4. ioctl commit atomic write
5. close db file
With this flow we can avoid file becoming corrupted when abnormal power
cut, because we hold data of transaction in referenced pages linked in
inmem_pages list of inode, but without setting them dirty, so these data
won't be persisted unless we commit them in step 4.
But we should still hold journal db file in memory by using volatile
write, because our semantics of 'atomic write support' is incomplete, in
step 4, we could fail to submit all dirty data of transaction, once
partial dirty data was committed in storage, then after a checkpoint &
abnormal power-cut, db file will be corrupted forever.
So this patch tries to improve atomic write flow by adding a revoking flow,
once inner error occurs in committing, this gives another chance to try to
revoke these partial submitted data of current transaction, it makes
committing operation more like aotmical one.
If we're not lucky, once revoking operation was failed, EAGAIN will be
reported to user for suggesting doing the recovery with held journal file,
or retrying current transaction again.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-06 09:40:34 +03:00
|
|
|
{ INMEM_REVOKE, "INMEM_REVOKE" }, \
|
2015-03-18 03:58:08 +03:00
|
|
|
{ IPU, "IN-PLACE" }, \
|
|
|
|
{ OPU, "OUT-OF-PLACE" })
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2016-12-22 01:26:39 +03:00
|
|
|
#define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_PREFLUSH | REQ_META |\
|
|
|
|
REQ_PRIO)
|
|
|
|
#define F2FS_BIO_FLAG_MASK(t) (t & F2FS_OP_FLAGS)
|
|
|
|
|
|
|
|
#define show_bio_type(op,op_flags) show_bio_op(op), \
|
|
|
|
show_bio_op_flags(op_flags)
|
|
|
|
|
|
|
|
#define show_bio_op(op) \
|
|
|
|
__print_symbolic(op, \
|
|
|
|
{ REQ_OP_READ, "READ" }, \
|
|
|
|
{ REQ_OP_WRITE, "WRITE" }, \
|
|
|
|
{ REQ_OP_FLUSH, "FLUSH" }, \
|
|
|
|
{ REQ_OP_DISCARD, "DISCARD" }, \
|
|
|
|
{ REQ_OP_ZONE_REPORT, "ZONE_REPORT" }, \
|
|
|
|
{ REQ_OP_SECURE_ERASE, "SECURE_ERASE" }, \
|
|
|
|
{ REQ_OP_ZONE_RESET, "ZONE_RESET" }, \
|
|
|
|
{ REQ_OP_WRITE_SAME, "WRITE_SAME" }, \
|
|
|
|
{ REQ_OP_WRITE_ZEROES, "WRITE_ZEROES" })
|
2016-06-05 22:31:55 +03:00
|
|
|
|
|
|
|
#define show_bio_op_flags(flags) \
|
|
|
|
__print_symbolic(F2FS_BIO_FLAG_MASK(flags), \
|
2016-12-22 01:26:39 +03:00
|
|
|
{ REQ_RAHEAD, "(RA)" }, \
|
|
|
|
{ REQ_SYNC, "(S)" }, \
|
|
|
|
{ REQ_SYNC | REQ_PRIO, "(SP)" }, \
|
2013-11-24 09:42:23 +04:00
|
|
|
{ REQ_META, "(M)" }, \
|
|
|
|
{ REQ_META | REQ_PRIO, "(MP)" }, \
|
2017-02-03 05:18:06 +03:00
|
|
|
{ REQ_SYNC | REQ_PREFLUSH , "(SF)" }, \
|
2016-12-22 01:26:39 +03:00
|
|
|
{ REQ_SYNC | REQ_META | REQ_PRIO, "(SMP)" }, \
|
|
|
|
{ REQ_PREFLUSH | REQ_META | REQ_PRIO, "(FMP)" }, \
|
2013-11-24 09:42:23 +04:00
|
|
|
{ 0, " \b" })
|
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
#define show_data_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ CURSEG_HOT_DATA, "Hot DATA" }, \
|
|
|
|
{ CURSEG_WARM_DATA, "Warm DATA" }, \
|
|
|
|
{ CURSEG_COLD_DATA, "Cold DATA" }, \
|
|
|
|
{ CURSEG_HOT_NODE, "Hot NODE" }, \
|
|
|
|
{ CURSEG_WARM_NODE, "Warm NODE" }, \
|
|
|
|
{ CURSEG_COLD_NODE, "Cold NODE" }, \
|
|
|
|
{ NO_CHECK_TYPE, "No TYPE" })
|
|
|
|
|
2013-10-24 12:53:29 +04:00
|
|
|
#define show_file_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ 0, "FILE" }, \
|
|
|
|
{ 1, "DIR" })
|
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
#define show_gc_type(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ FG_GC, "Foreground GC" }, \
|
|
|
|
{ BG_GC, "Background GC" })
|
|
|
|
|
|
|
|
#define show_alloc_mode(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ LFS, "LFS-mode" }, \
|
|
|
|
{ SSR, "SSR-mode" })
|
|
|
|
|
|
|
|
#define show_victim_policy(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ GC_GREEDY, "Greedy" }, \
|
|
|
|
{ GC_CB, "Cost-Benefit" })
|
|
|
|
|
2014-09-21 08:57:51 +04:00
|
|
|
#define show_cpreason(type) \
|
|
|
|
__print_symbolic(type, \
|
|
|
|
{ CP_UMOUNT, "Umount" }, \
|
2015-01-29 22:45:33 +03:00
|
|
|
{ CP_FASTBOOT, "Fastboot" }, \
|
2014-09-21 09:06:39 +04:00
|
|
|
{ CP_SYNC, "Sync" }, \
|
2015-04-10 03:03:53 +03:00
|
|
|
{ CP_RECOVERY, "Recovery" }, \
|
2014-09-21 09:06:39 +04:00
|
|
|
{ CP_DISCARD, "Discard" })
|
2014-09-21 08:57:51 +04:00
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
struct victim_sel_policy;
|
2015-04-07 05:55:34 +03:00
|
|
|
struct f2fs_map_blocks;
|
2013-04-23 11:42:53 +04:00
|
|
|
|
2013-04-19 20:28:40 +04:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(ino_t, pino)
|
|
|
|
__field(umode_t, mode)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(unsigned int, nlink)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(__u8, advise)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pino = F2FS_I(inode)->i_pino;
|
|
|
|
__entry->mode = inode->i_mode;
|
|
|
|
__entry->nlink = inode->i_nlink;
|
|
|
|
__entry->size = inode->i_size;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
__entry->advise = F2FS_I(inode)->i_advise;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
|
|
|
|
"i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->pino,
|
|
|
|
__entry->mode,
|
|
|
|
__entry->size,
|
|
|
|
(unsigned int)__entry->nlink,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
(unsigned char)__entry->advise)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__inode_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_sync_file_exit,
|
|
|
|
|
2015-02-11 03:23:12 +03:00
|
|
|
TP_PROTO(struct inode *inode, int need_cp, int datasync, int ret),
|
2013-04-19 20:28:40 +04:00
|
|
|
|
|
|
|
TP_ARGS(inode, need_cp, datasync, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2015-02-11 03:23:12 +03:00
|
|
|
__field(int, need_cp)
|
2013-04-19 20:28:40 +04:00
|
|
|
__field(int, datasync)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->need_cp = need_cp;
|
|
|
|
__entry->datasync = datasync;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, checkpoint is %s, "
|
|
|
|
"datasync = %d, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->need_cp ? "needed" : "not needed",
|
|
|
|
__entry->datasync,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_sync_fs,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int wait),
|
|
|
|
|
|
|
|
TP_ARGS(sb, wait),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2015-02-11 03:23:12 +03:00
|
|
|
__field(int, dirty)
|
2013-04-19 20:28:40 +04:00
|
|
|
__field(int, wait)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2015-01-28 12:48:42 +03:00
|
|
|
__entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY);
|
2013-04-19 20:28:40 +04:00
|
|
|
__entry->wait = wait;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-04-19 20:28:40 +04:00
|
|
|
__entry->dirty ? "dirty" : "not dirty",
|
|
|
|
__entry->wait)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_iget,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_iget_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_evict_inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
2013-04-25 08:24:33 +04:00
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
2013-04-19 20:28:40 +04:00
|
|
|
TRACE_EVENT(f2fs_unlink_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *dir, struct dentry *dentry),
|
|
|
|
|
|
|
|
TP_ARGS(dir, dentry),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(const char *, name)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = dir->i_sb->s_dev;
|
|
|
|
__entry->ino = dir->i_ino;
|
|
|
|
__entry->size = dir->i_size;
|
|
|
|
__entry->blocks = dir->i_blocks;
|
|
|
|
__entry->name = dentry->d_name.name;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
|
|
|
|
"i_blocks = %llu, name = %s",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->size,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
__entry->name)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_unlink_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
2013-04-19 20:28:52 +04:00
|
|
|
|
2017-02-27 16:02:58 +03:00
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_drop_inode,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
2013-04-19 20:28:52 +04:00
|
|
|
DEFINE_EVENT(f2fs__inode, f2fs_truncate,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode),
|
|
|
|
|
|
|
|
TP_ARGS(inode)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_truncate_data_blocks_range,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, ofs, free),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(nid_t, nid)
|
|
|
|
__field(unsigned int, ofs)
|
|
|
|
__field(int, free)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nid = nid;
|
|
|
|
__entry->ofs = ofs;
|
|
|
|
__entry->free = free;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned int)__entry->nid,
|
|
|
|
__entry->ofs,
|
|
|
|
__entry->free)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__truncate_op,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, u64 from),
|
|
|
|
|
|
|
|
TP_ARGS(inode, from),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(u64, from)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->size = inode->i_size;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
__entry->from = from;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
|
|
|
|
"start file offset = %llu",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->size,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
(unsigned long long)__entry->from)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_blocks_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, u64 from),
|
|
|
|
|
|
|
|
TP_ARGS(inode, from)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_blocks_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_inode_blocks_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, u64 from),
|
|
|
|
|
|
|
|
TP_ARGS(inode, from)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_inode_blocks_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DECLARE_EVENT_CLASS(f2fs__truncate_node,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, blk_addr),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(nid_t, nid)
|
|
|
|
__field(block_t, blk_addr)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nid = nid;
|
|
|
|
__entry->blk_addr = blk_addr;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned int)__entry->nid,
|
|
|
|
(unsigned long long)__entry->blk_addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_nodes_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, blk_addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_nodes_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, ret)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_node,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, blk_addr)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_truncate_partial_nodes,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, nid_t nid[], int depth, int err),
|
|
|
|
|
|
|
|
TP_ARGS(inode, nid, depth, err),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(nid_t, nid[3])
|
|
|
|
__field(int, depth)
|
|
|
|
__field(int, err)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->nid[0] = nid[0];
|
|
|
|
__entry->nid[1] = nid[1];
|
|
|
|
__entry->nid[2] = nid[2];
|
|
|
|
__entry->depth = depth;
|
|
|
|
__entry->err = err;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, "
|
|
|
|
"nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned int)__entry->nid[0],
|
|
|
|
(unsigned int)__entry->nid[1],
|
|
|
|
(unsigned int)__entry->nid[2],
|
|
|
|
__entry->depth,
|
|
|
|
__entry->err)
|
|
|
|
);
|
|
|
|
|
2015-04-07 05:55:34 +03:00
|
|
|
TRACE_EVENT(f2fs_map_blocks,
|
|
|
|
TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int ret),
|
2013-04-23 11:38:02 +04:00
|
|
|
|
2015-04-07 05:55:34 +03:00
|
|
|
TP_ARGS(inode, map, ret),
|
2013-04-23 11:38:02 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
2015-04-07 05:55:34 +03:00
|
|
|
__field(block_t, m_lblk)
|
|
|
|
__field(block_t, m_pblk)
|
|
|
|
__field(unsigned int, m_len)
|
2013-04-23 11:38:02 +04:00
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
2015-04-07 05:55:34 +03:00
|
|
|
__entry->m_lblk = map->m_lblk;
|
|
|
|
__entry->m_pblk = map->m_pblk;
|
|
|
|
__entry->m_len = map->m_len;
|
2013-04-23 11:38:02 +04:00
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
|
2015-04-07 05:55:34 +03:00
|
|
|
"start blkaddr = 0x%llx, len = 0x%llx, err = %d",
|
2013-04-23 11:38:02 +04:00
|
|
|
show_dev_ino(__entry),
|
2015-04-07 05:55:34 +03:00
|
|
|
(unsigned long long)__entry->m_lblk,
|
|
|
|
(unsigned long long)__entry->m_pblk,
|
|
|
|
(unsigned long long)__entry->m_len,
|
2013-04-23 11:38:02 +04:00
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2015-10-05 21:32:34 +03:00
|
|
|
TRACE_EVENT(f2fs_background_gc,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, long wait_ms,
|
|
|
|
unsigned int prefree, unsigned int free),
|
|
|
|
|
|
|
|
TP_ARGS(sb, wait_ms, prefree, free),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(long, wait_ms)
|
|
|
|
__field(unsigned int, prefree)
|
|
|
|
__field(unsigned int, free)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->wait_ms = wait_ms;
|
|
|
|
__entry->prefree = prefree;
|
|
|
|
__entry->free = free;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), wait_ms = %ld, prefree = %u, free = %u",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2015-10-05 21:32:34 +03:00
|
|
|
__entry->wait_ms,
|
|
|
|
__entry->prefree,
|
|
|
|
__entry->free)
|
|
|
|
);
|
|
|
|
|
2013-04-23 11:42:53 +04:00
|
|
|
TRACE_EVENT(f2fs_get_victim,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int type, int gc_type,
|
|
|
|
struct victim_sel_policy *p, unsigned int pre_victim,
|
|
|
|
unsigned int prefree, unsigned int free),
|
|
|
|
|
|
|
|
TP_ARGS(sb, type, gc_type, p, pre_victim, prefree, free),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(int, type)
|
|
|
|
__field(int, gc_type)
|
|
|
|
__field(int, alloc_mode)
|
|
|
|
__field(int, gc_mode)
|
|
|
|
__field(unsigned int, victim)
|
2017-02-16 21:35:41 +03:00
|
|
|
__field(unsigned int, cost)
|
2013-04-23 11:42:53 +04:00
|
|
|
__field(unsigned int, ofs_unit)
|
|
|
|
__field(unsigned int, pre_victim)
|
|
|
|
__field(unsigned int, prefree)
|
|
|
|
__field(unsigned int, free)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->gc_type = gc_type;
|
|
|
|
__entry->alloc_mode = p->alloc_mode;
|
|
|
|
__entry->gc_mode = p->gc_mode;
|
|
|
|
__entry->victim = p->min_segno;
|
2017-02-16 21:35:41 +03:00
|
|
|
__entry->cost = p->min_cost;
|
2013-04-23 11:42:53 +04:00
|
|
|
__entry->ofs_unit = p->ofs_unit;
|
|
|
|
__entry->pre_victim = pre_victim;
|
|
|
|
__entry->prefree = prefree;
|
|
|
|
__entry->free = free;
|
|
|
|
),
|
|
|
|
|
2017-02-16 21:35:41 +03:00
|
|
|
TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), "
|
|
|
|
"victim = %u, cost = %u, ofs_unit = %u, "
|
|
|
|
"pre_victim_secno = %d, prefree = %u, free = %u",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-04-23 11:42:53 +04:00
|
|
|
show_data_type(__entry->type),
|
|
|
|
show_gc_type(__entry->gc_type),
|
|
|
|
show_alloc_mode(__entry->alloc_mode),
|
|
|
|
show_victim_policy(__entry->gc_mode),
|
|
|
|
__entry->victim,
|
2017-02-16 21:35:41 +03:00
|
|
|
__entry->cost,
|
2013-04-23 11:42:53 +04:00
|
|
|
__entry->ofs_unit,
|
|
|
|
(int)__entry->pre_victim,
|
|
|
|
__entry->prefree,
|
|
|
|
__entry->free)
|
|
|
|
);
|
|
|
|
|
2013-04-23 12:00:52 +04:00
|
|
|
TRACE_EVENT(f2fs_fallocate,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, int mode,
|
|
|
|
loff_t offset, loff_t len, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, mode, offset, len, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, mode)
|
|
|
|
__field(loff_t, offset)
|
|
|
|
__field(loff_t, len)
|
|
|
|
__field(loff_t, size)
|
|
|
|
__field(blkcnt_t, blocks)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->mode = mode;
|
|
|
|
__entry->offset = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->size = inode->i_size;
|
|
|
|
__entry->blocks = inode->i_blocks;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
|
|
|
|
"len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->mode,
|
|
|
|
(unsigned long long)__entry->offset,
|
|
|
|
(unsigned long long)__entry->len,
|
|
|
|
(unsigned long long)__entry->size,
|
|
|
|
(unsigned long long)__entry->blocks,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2014-07-31 17:11:22 +04:00
|
|
|
TRACE_EVENT(f2fs_direct_IO_enter,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, len, rw),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned long, len)
|
|
|
|
__field(int, rw)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->rw = rw;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu rw = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pos,
|
|
|
|
__entry->len,
|
|
|
|
__entry->rw)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_direct_IO_exit,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
|
|
|
|
int rw, int ret),
|
|
|
|
|
|
|
|
TP_ARGS(inode, offset, len, rw, ret),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned long, len)
|
|
|
|
__field(int, rw)
|
|
|
|
__field(int, ret)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = offset;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->rw = rw;
|
|
|
|
__entry->ret = ret;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
|
|
|
|
"rw = %d ret = %d",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pos,
|
|
|
|
__entry->len,
|
|
|
|
__entry->rw,
|
|
|
|
__entry->ret)
|
|
|
|
);
|
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TRACE_EVENT(f2fs_reserve_new_blocks,
|
2013-04-23 12:00:52 +04:00
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node,
|
|
|
|
blkcnt_t count),
|
2013-04-23 12:00:52 +04:00
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TP_ARGS(inode, nid, ofs_in_node, count),
|
2013-04-23 12:00:52 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(nid_t, nid)
|
|
|
|
__field(unsigned int, ofs_in_node)
|
2016-05-09 14:56:30 +03:00
|
|
|
__field(blkcnt_t, count)
|
2013-04-23 12:00:52 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->nid = nid;
|
|
|
|
__entry->ofs_in_node = ofs_in_node;
|
2016-05-09 14:56:30 +03:00
|
|
|
__entry->count = count;
|
2013-04-23 12:00:52 +04:00
|
|
|
),
|
|
|
|
|
2016-05-09 14:56:30 +03:00
|
|
|
TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u, count = %llu",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-04-23 12:00:52 +04:00
|
|
|
(unsigned int)__entry->nid,
|
2016-05-09 14:56:30 +03:00
|
|
|
__entry->ofs_in_node,
|
|
|
|
(unsigned long long)__entry->count)
|
2013-04-23 12:00:52 +04:00
|
|
|
);
|
|
|
|
|
2014-12-23 11:35:21 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
|
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_PROTO(struct page *page, struct f2fs_io_info *fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_ARGS(page, fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, index)
|
f2fs: trace old block address for CoWed page
This patch enables to trace old block address of CoWed page for better
debugging.
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 13:36:38 +03:00
|
|
|
__field(block_t, old_blkaddr)
|
|
|
|
__field(block_t, new_blkaddr)
|
2016-06-05 22:31:55 +03:00
|
|
|
__field(int, op)
|
|
|
|
__field(int, op_flags)
|
2014-12-23 11:35:21 +03:00
|
|
|
__field(int, type)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = page->mapping->host->i_sb->s_dev;
|
|
|
|
__entry->ino = page->mapping->host->i_ino;
|
|
|
|
__entry->index = page->index;
|
f2fs: trace old block address for CoWed page
This patch enables to trace old block address of CoWed page for better
debugging.
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 13:36:38 +03:00
|
|
|
__entry->old_blkaddr = fio->old_blkaddr;
|
|
|
|
__entry->new_blkaddr = fio->new_blkaddr;
|
2016-06-05 22:31:55 +03:00
|
|
|
__entry->op = fio->op;
|
|
|
|
__entry->op_flags = fio->op_flags;
|
2014-12-24 11:08:14 +03:00
|
|
|
__entry->type = fio->type;
|
2014-12-23 11:35:21 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
|
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>
2016-08-06 16:09:40 +03:00
|
|
|
"oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s%s, type = %s",
|
2014-12-23 11:35:21 +03:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->index,
|
f2fs: trace old block address for CoWed page
This patch enables to trace old block address of CoWed page for better
debugging.
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2016-02-22 13:36:38 +03:00
|
|
|
(unsigned long long)__entry->old_blkaddr,
|
|
|
|
(unsigned long long)__entry->new_blkaddr,
|
2016-12-22 01:26:39 +03:00
|
|
|
show_bio_type(__entry->op, __entry->op_flags),
|
2014-12-23 11:35:21 +03:00
|
|
|
show_block_type(__entry->type))
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio,
|
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_PROTO(struct page *page, struct f2fs_io_info *fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_ARGS(page, fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
|
|
|
TP_CONDITION(page->mapping)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio,
|
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_PROTO(struct page *page, struct f2fs_io_info *fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
2014-12-24 11:08:14 +03:00
|
|
|
TP_ARGS(page, fio),
|
2014-12-23 11:35:21 +03:00
|
|
|
|
|
|
|
TP_CONDITION(page->mapping)
|
|
|
|
);
|
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__bio,
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
2013-04-23 12:51:43 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_ARGS(sb, type, bio),
|
2013-04-23 12:51:43 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2017-02-15 22:14:06 +03:00
|
|
|
__field(dev_t, target)
|
2016-06-05 22:31:55 +03:00
|
|
|
__field(int, op)
|
|
|
|
__field(int, op_flags)
|
2013-11-24 07:36:42 +04:00
|
|
|
__field(int, type)
|
2013-04-23 12:51:43 +04:00
|
|
|
__field(sector_t, sector)
|
|
|
|
__field(unsigned int, size)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->target = bio->bi_bdev->bd_dev;
|
2016-12-21 23:13:03 +03:00
|
|
|
__entry->op = bio_op(bio);
|
|
|
|
__entry->op_flags = bio->bi_opf;
|
|
|
|
__entry->type = type;
|
2013-10-12 02:44:27 +04:00
|
|
|
__entry->sector = bio->bi_iter.bi_sector;
|
|
|
|
__entry->size = bio->bi_iter.bi_size;
|
2013-04-23 12:51:43 +04:00
|
|
|
),
|
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_printk("dev = (%d,%d)/(%d,%d), rw = %s%s, %s, sector = %lld, size = %u",
|
|
|
|
show_dev(__entry->target),
|
|
|
|
show_dev(__entry->dev),
|
2016-12-22 01:26:39 +03:00
|
|
|
show_bio_type(__entry->op, __entry->op_flags),
|
2013-11-24 07:36:42 +04:00
|
|
|
show_block_type(__entry->type),
|
2013-04-23 12:51:43 +04:00
|
|
|
(unsigned long long)__entry->sector,
|
|
|
|
__entry->size)
|
|
|
|
);
|
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_write_bio,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
|
|
|
|
|
|
|
TP_ARGS(sb, type, bio),
|
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_read_bio,
|
|
|
|
|
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
|
|
|
|
|
|
|
TP_ARGS(sb, type, bio),
|
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_read_bio,
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_ARGS(sb, type, bio),
|
2013-11-30 07:51:14 +04:00
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
2013-11-24 07:36:42 +04:00
|
|
|
);
|
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, struct bio *bio),
|
2013-11-24 07:36:42 +04:00
|
|
|
|
2016-12-21 23:13:03 +03:00
|
|
|
TP_ARGS(sb, type, bio),
|
2013-11-30 07:51:14 +04:00
|
|
|
|
|
|
|
TP_CONDITION(bio)
|
2013-11-24 07:36:42 +04:00
|
|
|
);
|
|
|
|
|
2014-05-06 12:46:04 +04:00
|
|
|
TRACE_EVENT(f2fs_write_begin,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int flags),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pos, len, flags),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
__field(unsigned int, flags)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = pos;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->flags = flags;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long long)__entry->pos,
|
|
|
|
__entry->len,
|
|
|
|
__entry->flags)
|
|
|
|
);
|
|
|
|
|
2014-05-06 12:47:23 +04:00
|
|
|
TRACE_EVENT(f2fs_write_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
|
|
|
|
unsigned int copied),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pos, len, copied),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(loff_t, pos)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
__field(unsigned int, copied)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pos = pos;
|
|
|
|
__entry->len = len;
|
|
|
|
__entry->copied = copied;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long long)__entry->pos,
|
|
|
|
__entry->len,
|
|
|
|
__entry->copied)
|
|
|
|
);
|
|
|
|
|
2013-10-24 12:53:29 +04:00
|
|
|
DECLARE_EVENT_CLASS(f2fs__page,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, type)
|
|
|
|
__field(int, dir)
|
|
|
|
__field(pgoff_t, index)
|
|
|
|
__field(int, dirty)
|
2014-05-06 12:53:08 +04:00
|
|
|
__field(int, uptodate)
|
2013-10-24 12:53:29 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = page->mapping->host->i_sb->s_dev;
|
|
|
|
__entry->ino = page->mapping->host->i_ino;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->dir = S_ISDIR(page->mapping->host->i_mode);
|
|
|
|
__entry->index = page->index;
|
|
|
|
__entry->dirty = PageDirty(page);
|
2014-05-06 12:53:08 +04:00
|
|
|
__entry->uptodate = PageUptodate(page);
|
2013-10-24 12:53:29 +04:00
|
|
|
),
|
|
|
|
|
2014-05-06 12:53:08 +04:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
|
|
|
|
"dirty = %d, uptodate = %d",
|
2013-10-24 12:53:29 +04:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
show_block_type(__entry->type),
|
|
|
|
show_file_type(__entry->dir),
|
|
|
|
(unsigned long)__entry->index,
|
2014-05-06 12:53:08 +04:00
|
|
|
__entry->dirty,
|
|
|
|
__entry->uptodate)
|
2013-10-24 12:53:29 +04:00
|
|
|
);
|
|
|
|
|
2014-05-06 12:48:26 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_writepage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2015-03-18 03:58:08 +03:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2014-05-06 12:53:08 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_readpage,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2013-10-24 12:53:29 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2013-10-25 09:26:31 +04:00
|
|
|
DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite,
|
|
|
|
|
|
|
|
TP_PROTO(struct page *page, int type),
|
|
|
|
|
|
|
|
TP_ARGS(page, type)
|
|
|
|
);
|
|
|
|
|
2015-03-18 03:58:08 +03:00
|
|
|
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)
|
|
|
|
);
|
|
|
|
|
2014-05-06 12:51:24 +04:00
|
|
|
TRACE_EVENT(f2fs_writepages,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, struct writeback_control *wbc, int type),
|
|
|
|
|
|
|
|
TP_ARGS(inode, wbc, type),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(int, type)
|
|
|
|
__field(int, dir)
|
|
|
|
__field(long, nr_to_write)
|
|
|
|
__field(long, pages_skipped)
|
|
|
|
__field(loff_t, range_start)
|
|
|
|
__field(loff_t, range_end)
|
|
|
|
__field(pgoff_t, writeback_index)
|
|
|
|
__field(int, sync_mode)
|
|
|
|
__field(char, for_kupdate)
|
|
|
|
__field(char, for_background)
|
|
|
|
__field(char, tagged_writepages)
|
|
|
|
__field(char, for_reclaim)
|
|
|
|
__field(char, range_cyclic)
|
|
|
|
__field(char, for_sync)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->dir = S_ISDIR(inode->i_mode);
|
|
|
|
__entry->nr_to_write = wbc->nr_to_write;
|
|
|
|
__entry->pages_skipped = wbc->pages_skipped;
|
|
|
|
__entry->range_start = wbc->range_start;
|
|
|
|
__entry->range_end = wbc->range_end;
|
|
|
|
__entry->writeback_index = inode->i_mapping->writeback_index;
|
|
|
|
__entry->sync_mode = wbc->sync_mode;
|
|
|
|
__entry->for_kupdate = wbc->for_kupdate;
|
|
|
|
__entry->for_background = wbc->for_background;
|
|
|
|
__entry->tagged_writepages = wbc->tagged_writepages;
|
|
|
|
__entry->for_reclaim = wbc->for_reclaim;
|
|
|
|
__entry->range_cyclic = wbc->range_cyclic;
|
|
|
|
__entry->for_sync = wbc->for_sync;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
|
|
|
|
"skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
|
|
|
|
"kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
show_block_type(__entry->type),
|
|
|
|
show_file_type(__entry->dir),
|
|
|
|
__entry->nr_to_write,
|
|
|
|
__entry->pages_skipped,
|
|
|
|
__entry->range_start,
|
|
|
|
__entry->range_end,
|
|
|
|
(unsigned long)__entry->writeback_index,
|
|
|
|
__entry->sync_mode,
|
|
|
|
__entry->for_kupdate,
|
|
|
|
__entry->for_background,
|
|
|
|
__entry->tagged_writepages,
|
|
|
|
__entry->for_reclaim,
|
|
|
|
__entry->range_cyclic,
|
|
|
|
__entry->for_sync)
|
|
|
|
);
|
|
|
|
|
2015-10-12 12:02:26 +03:00
|
|
|
TRACE_EVENT(f2fs_readpages,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage),
|
|
|
|
|
|
|
|
TP_ARGS(inode, page, nrpage),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(pgoff_t, start)
|
|
|
|
__field(unsigned int, nrpage)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->start = page->index;
|
|
|
|
__entry->nrpage = nrpage;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
(unsigned long)__entry->start,
|
|
|
|
__entry->nrpage)
|
|
|
|
);
|
|
|
|
|
2013-04-23 13:26:54 +04:00
|
|
|
TRACE_EVENT(f2fs_write_checkpoint,
|
|
|
|
|
2014-09-21 08:57:51 +04:00
|
|
|
TP_PROTO(struct super_block *sb, int reason, char *msg),
|
2013-04-23 13:26:54 +04:00
|
|
|
|
2014-09-21 08:57:51 +04:00
|
|
|
TP_ARGS(sb, reason, msg),
|
2013-04-23 13:26:54 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2014-09-21 08:57:51 +04:00
|
|
|
__field(int, reason)
|
2013-04-23 13:26:54 +04:00
|
|
|
__field(char *, msg)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
2014-09-21 08:57:51 +04:00
|
|
|
__entry->reason = reason;
|
2013-04-23 13:26:54 +04:00
|
|
|
__entry->msg = msg;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2014-09-21 08:57:51 +04:00
|
|
|
show_cpreason(__entry->reason),
|
2013-04-23 13:26:54 +04:00
|
|
|
__entry->msg)
|
|
|
|
);
|
|
|
|
|
2013-11-12 12:01:00 +04:00
|
|
|
TRACE_EVENT(f2fs_issue_discard,
|
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
|
2013-11-12 12:01:00 +04:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_ARGS(dev, blkstart, blklen),
|
2013-11-12 12:01:00 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(block_t, blkstart)
|
|
|
|
__field(block_t, blklen)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->dev = dev->bd_dev;
|
2013-11-12 12:01:00 +04:00
|
|
|
__entry->blkstart = blkstart;
|
|
|
|
__entry->blklen = blklen;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2013-11-12 12:01:00 +04:00
|
|
|
(unsigned long long)__entry->blkstart,
|
|
|
|
(unsigned long long)__entry->blklen)
|
|
|
|
);
|
2014-07-26 04:46:10 +04:00
|
|
|
|
2016-10-28 11:45:07 +03:00
|
|
|
TRACE_EVENT(f2fs_issue_reset_zone,
|
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_PROTO(struct block_device *dev, block_t blkstart),
|
2016-10-28 11:45:07 +03:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_ARGS(dev, blkstart),
|
2016-10-28 11:45:07 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(block_t, blkstart)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->dev = dev->bd_dev;
|
2016-10-28 11:45:07 +03:00
|
|
|
__entry->blkstart = blkstart;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), reset zone at block = 0x%llx",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2016-10-28 11:45:07 +03:00
|
|
|
(unsigned long long)__entry->blkstart)
|
|
|
|
);
|
|
|
|
|
2014-07-26 04:46:10 +04:00
|
|
|
TRACE_EVENT(f2fs_issue_flush,
|
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_PROTO(struct block_device *dev, unsigned int nobarrier,
|
2015-02-11 03:23:12 +03:00
|
|
|
unsigned int flush_merge),
|
2014-07-26 04:46:10 +04:00
|
|
|
|
2017-02-15 22:14:06 +03:00
|
|
|
TP_ARGS(dev, nobarrier, flush_merge),
|
2014-07-26 04:46:10 +04:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
2015-02-11 03:23:12 +03:00
|
|
|
__field(unsigned int, nobarrier)
|
|
|
|
__field(unsigned int, flush_merge)
|
2014-07-26 04:46:10 +04:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2017-02-15 22:14:06 +03:00
|
|
|
__entry->dev = dev->bd_dev;
|
2014-07-26 04:46:10 +04:00
|
|
|
__entry->nobarrier = nobarrier;
|
|
|
|
__entry->flush_merge = flush_merge;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), %s %s",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2014-07-26 04:46:10 +04:00
|
|
|
__entry->nobarrier ? "skip (nobarrier)" : "issue",
|
|
|
|
__entry->flush_merge ? " with flush_merge" : "")
|
|
|
|
);
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_lookup_extent_tree_start,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs),
|
|
|
|
|
|
|
|
TP_ARGS(inode, pgofs),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs,
|
2015-06-30 02:01:14 +03:00
|
|
|
struct extent_info *ei),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2015-06-30 02:01:14 +03:00
|
|
|
TP_ARGS(inode, pgofs, ei),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2015-06-30 02:01:14 +03:00
|
|
|
TP_CONDITION(ei),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
__field(unsigned int, fofs)
|
|
|
|
__field(u32, blk)
|
|
|
|
__field(unsigned int, len)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
2015-06-30 02:01:14 +03:00
|
|
|
__entry->fofs = ei->fofs;
|
|
|
|
__entry->blk = ei->blk;
|
|
|
|
__entry->len = ei->len;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
|
|
|
"ext_info(fofs: %u, blk: %u, len: %u)",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs,
|
|
|
|
__entry->fofs,
|
|
|
|
__entry->blk,
|
|
|
|
__entry->len)
|
|
|
|
);
|
|
|
|
|
2015-09-06 12:50:13 +03:00
|
|
|
TRACE_EVENT(f2fs_update_extent_tree_range,
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2015-09-06 12:50:13 +03:00
|
|
|
TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr,
|
|
|
|
unsigned int len),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
2015-09-06 12:50:13 +03:00
|
|
|
TP_ARGS(inode, pgofs, blkaddr, len),
|
2015-02-05 12:59:59 +03:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, pgofs)
|
|
|
|
__field(u32, blk)
|
2015-09-06 12:50:13 +03:00
|
|
|
__field(unsigned int, len)
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->pgofs = pgofs;
|
|
|
|
__entry->blk = blkaddr;
|
2015-09-06 12:50:13 +03:00
|
|
|
__entry->len = len;
|
2015-02-05 12:59:59 +03:00
|
|
|
),
|
|
|
|
|
2015-09-06 12:50:13 +03:00
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
|
|
|
"blkaddr = %u, len = %u",
|
2015-02-05 12:59:59 +03:00
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->pgofs,
|
2015-09-06 12:50:13 +03:00
|
|
|
__entry->blk,
|
|
|
|
__entry->len)
|
2015-02-05 12:59:59 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_shrink_extent_tree,
|
|
|
|
|
|
|
|
TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt,
|
|
|
|
unsigned int tree_cnt),
|
|
|
|
|
|
|
|
TP_ARGS(sbi, node_cnt, tree_cnt),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(unsigned int, node_cnt)
|
|
|
|
__field(unsigned int, tree_cnt)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sbi->sb->s_dev;
|
|
|
|
__entry->node_cnt = node_cnt;
|
|
|
|
__entry->tree_cnt = tree_cnt;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2015-02-05 12:59:59 +03:00
|
|
|
__entry->node_cnt,
|
|
|
|
__entry->tree_cnt)
|
|
|
|
);
|
|
|
|
|
|
|
|
TRACE_EVENT(f2fs_destroy_extent_tree,
|
|
|
|
|
|
|
|
TP_PROTO(struct inode *inode, unsigned int node_cnt),
|
|
|
|
|
|
|
|
TP_ARGS(inode, node_cnt),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(ino_t, ino)
|
|
|
|
__field(unsigned int, node_cnt)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = inode->i_sb->s_dev;
|
|
|
|
__entry->ino = inode->i_ino;
|
|
|
|
__entry->node_cnt = node_cnt;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u",
|
|
|
|
show_dev_ino(__entry),
|
|
|
|
__entry->node_cnt)
|
|
|
|
);
|
|
|
|
|
2015-12-17 12:17:16 +03:00
|
|
|
DECLARE_EVENT_CLASS(f2fs_sync_dirty_inodes,
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, s64 count),
|
2015-12-17 12:17:16 +03:00
|
|
|
|
|
|
|
TP_ARGS(sb, type, count),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(dev_t, dev)
|
|
|
|
__field(int, type)
|
2016-05-13 22:36:58 +03:00
|
|
|
__field(s64, count)
|
2015-12-17 12:17:16 +03:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->dev = sb->s_dev;
|
|
|
|
__entry->type = type;
|
|
|
|
__entry->count = count;
|
|
|
|
),
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_printk("dev = (%d,%d), %s, dirty count = %lld",
|
2017-02-15 22:14:06 +03:00
|
|
|
show_dev(__entry->dev),
|
2015-12-17 12:17:16 +03:00
|
|
|
show_file_type(__entry->type),
|
|
|
|
__entry->count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_enter,
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, s64 count),
|
2015-12-17 12:17:16 +03:00
|
|
|
|
|
|
|
TP_ARGS(sb, type, count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_exit,
|
|
|
|
|
2016-05-13 22:36:58 +03:00
|
|
|
TP_PROTO(struct super_block *sb, int type, s64 count),
|
2015-12-17 12:17:16 +03:00
|
|
|
|
|
|
|
TP_ARGS(sb, type, count)
|
|
|
|
);
|
|
|
|
|
2013-04-19 20:28:40 +04:00
|
|
|
#endif /* _TRACE_F2FS_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|