Skip to content

Commit b564553

Browse files
gnehzuiltytso
authored andcommitted
ext4: print 'flags' in ext4_ext_handle_uninitialized_extents
In trace_ext4_ext_handle_uninitialized_extents we don't care about the value of map->m_flags because this value is probably 0, and we prefer to get the value of flags because we can know how to handle this extent in this function. Reviewed-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent d71c1ae commit b564553

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎fs/ext4/extents.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,8 +3663,8 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
36633663
flags, allocated);
36643664
ext4_ext_show_leaf(inode, path);
36653665

3666-
trace_ext4_ext_handle_uninitialized_extents(inode, map, allocated,
3667-
newblock);
3666+
trace_ext4_ext_handle_uninitialized_extents(inode, map, flags,
3667+
allocated, newblock);
36683668

36693669
/* get_block() before submit the IO, split the extent */
36703670
if ((flags & EXT4_GET_BLOCKS_PRE_IO)) {

‎include/trace/events/ext4.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,10 +1680,10 @@ DEFINE_EVENT(ext4__trim, ext4_trim_all_free,
16801680
);
16811681

16821682
TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
1683-
TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1683+
TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
16841684
unsigned int allocated, ext4_fsblk_t newblock),
16851685

1686-
TP_ARGS(inode, map, allocated, newblock),
1686+
TP_ARGS(inode, map, flags, allocated, newblock),
16871687

16881688
TP_STRUCT__entry(
16891689
__field( dev_t, dev )
@@ -1699,15 +1699,15 @@ TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
16991699
TP_fast_assign(
17001700
__entry->dev = inode->i_sb->s_dev;
17011701
__entry->ino = inode->i_ino;
1702-
__entry->flags = map->m_flags;
1702+
__entry->flags = flags;
17031703
__entry->lblk = map->m_lblk;
17041704
__entry->pblk = map->m_pblk;
17051705
__entry->len = map->m_len;
17061706
__entry->allocated = allocated;
17071707
__entry->newblk = newblock;
17081708
),
17091709

1710-
TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d"
1710+
TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %x "
17111711
"allocated %d newblock %llu",
17121712
MAJOR(__entry->dev), MINOR(__entry->dev),
17131713
(unsigned long) __entry->ino,

0 commit comments

Comments
 (0)