f2fs: add "c_len" into trace_f2fs_update_extent_tree_range for compressed file
The trace_f2fs_update_extent_tree_range could not record compressed block length in the cluster of compress file and we just add it. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
c6ad7fd166
commit
a834aa3ec9
@ -544,7 +544,7 @@ static void f2fs_update_extent_tree_range(struct inode *inode,
|
||||
if (!et)
|
||||
return;
|
||||
|
||||
trace_f2fs_update_extent_tree_range(inode, fofs, blkaddr, len);
|
||||
trace_f2fs_update_extent_tree_range(inode, fofs, blkaddr, len, 0);
|
||||
|
||||
write_lock(&et->lock);
|
||||
|
||||
@ -675,7 +675,7 @@ void f2fs_update_extent_tree_range_compressed(struct inode *inode,
|
||||
struct rb_node **insert_p = NULL, *insert_parent = NULL;
|
||||
bool leftmost = false;
|
||||
|
||||
trace_f2fs_update_extent_tree_range(inode, fofs, blkaddr, llen);
|
||||
trace_f2fs_update_extent_tree_range(inode, fofs, blkaddr, llen, c_len);
|
||||
|
||||
/* it is safe here to check FI_NO_EXTENT w/o et->lock in ro image */
|
||||
if (is_inode_flag_set(inode, FI_NO_EXTENT))
|
||||
|
@ -1578,9 +1578,10 @@ TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end,
|
||||
TRACE_EVENT(f2fs_update_extent_tree_range,
|
||||
|
||||
TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr,
|
||||
unsigned int len),
|
||||
unsigned int len,
|
||||
unsigned int c_len),
|
||||
|
||||
TP_ARGS(inode, pgofs, blkaddr, len),
|
||||
TP_ARGS(inode, pgofs, blkaddr, len, c_len),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
@ -1588,6 +1589,7 @@ TRACE_EVENT(f2fs_update_extent_tree_range,
|
||||
__field(unsigned int, pgofs)
|
||||
__field(u32, blk)
|
||||
__field(unsigned int, len)
|
||||
__field(unsigned int, c_len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
@ -1596,14 +1598,17 @@ TRACE_EVENT(f2fs_update_extent_tree_range,
|
||||
__entry->pgofs = pgofs;
|
||||
__entry->blk = blkaddr;
|
||||
__entry->len = len;
|
||||
__entry->c_len = c_len;
|
||||
),
|
||||
|
||||
TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
|
||||
"blkaddr = %u, len = %u",
|
||||
"blkaddr = %u, len = %u, "
|
||||
"c_len = %u",
|
||||
show_dev_ino(__entry),
|
||||
__entry->pgofs,
|
||||
__entry->blk,
|
||||
__entry->len)
|
||||
__entry->len,
|
||||
__entry->c_len)
|
||||
);
|
||||
|
||||
TRACE_EVENT(f2fs_shrink_extent_tree,
|
||||
|
Loading…
Reference in New Issue
Block a user