ext4: print 'flags' in ext4_ext_handle_uninitialized_extents
authorZheng Liu <wenqing.lz@taobao.com>
Thu, 8 Nov 2012 19:33:43 +0000 (14:33 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 8 Nov 2012 19:33:43 +0000 (14:33 -0500)
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>
fs/ext4/extents.c
include/trace/events/ext4.h

index 7011ac967208e941272f09a07e3292d72ef576f9..59e6e12e00298eda489b19b695453be08777b092 100644 (file)
@@ -3663,8 +3663,8 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
                  flags, allocated);
        ext4_ext_show_leaf(inode, path);
 
-       trace_ext4_ext_handle_uninitialized_extents(inode, map, allocated,
-                                                   newblock);
+       trace_ext4_ext_handle_uninitialized_extents(inode, map, flags,
+                                                   allocated, newblock);
 
        /* get_block() before submit the IO, split the extent */
        if ((flags & EXT4_GET_BLOCKS_PRE_IO)) {
index d49b285385e8325d0ce0becbcc93b920d8037bde..25914e3002c7f5f48af936a9db527ef51f801138 100644 (file)
@@ -1680,10 +1680,10 @@ DEFINE_EVENT(ext4__trim, ext4_trim_all_free,
 );
 
 TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
-       TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
+       TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
                 unsigned int allocated, ext4_fsblk_t newblock),
 
-       TP_ARGS(inode, map, allocated, newblock),
+       TP_ARGS(inode, map, flags, allocated, newblock),
 
        TP_STRUCT__entry(
                __field(        dev_t,          dev             )
@@ -1699,7 +1699,7 @@ TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
        TP_fast_assign(
                __entry->dev            = inode->i_sb->s_dev;
                __entry->ino            = inode->i_ino;
-               __entry->flags          = map->m_flags;
+               __entry->flags          = flags;
                __entry->lblk           = map->m_lblk;
                __entry->pblk           = map->m_pblk;
                __entry->len            = map->m_len;
@@ -1707,7 +1707,7 @@ TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
                __entry->newblk         = newblock;
        ),
 
-       TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d"
+       TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %"
                  "allocated %d newblock %llu",
                  MAJOR(__entry->dev), MINOR(__entry->dev),
                  (unsigned long) __entry->ino,