ext4: fix extent_status trace points
Show pblock only if it has meaningful value. # before ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [1/4294967294) 576460752303423487 H ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [2/4294967293) 576460752303423487 HR # after ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [1/4294967294) 0 H ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [2/4294967293) 0 HR Signed-off-by: Dmitry Monakhov <dmonakhov@gmail.com> Link: https://lore.kernel.org/r/20191114200147.1073-2-dmonakhov@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
459c80742e
commit
52144d893d
@ -209,6 +209,12 @@ static inline ext4_fsblk_t ext4_es_pblock(struct extent_status *es)
|
||||
return es->es_pblk & ~ES_MASK;
|
||||
}
|
||||
|
||||
static inline ext4_fsblk_t ext4_es_show_pblock(struct extent_status *es)
|
||||
{
|
||||
ext4_fsblk_t pblock = ext4_es_pblock(es);
|
||||
return pblock == ~ES_MASK ? 0 : pblock;
|
||||
}
|
||||
|
||||
static inline void ext4_es_store_pblock(struct extent_status *es,
|
||||
ext4_fsblk_t pb)
|
||||
{
|
||||
|
@ -2282,7 +2282,7 @@ DECLARE_EVENT_CLASS(ext4__es_extent,
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->lblk = es->es_lblk;
|
||||
__entry->len = es->es_len;
|
||||
__entry->pblk = ext4_es_pblock(es);
|
||||
__entry->pblk = ext4_es_show_pblock(es);
|
||||
__entry->status = ext4_es_status(es);
|
||||
),
|
||||
|
||||
@ -2371,7 +2371,7 @@ TRACE_EVENT(ext4_es_find_extent_range_exit,
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->lblk = es->es_lblk;
|
||||
__entry->len = es->es_len;
|
||||
__entry->pblk = ext4_es_pblock(es);
|
||||
__entry->pblk = ext4_es_show_pblock(es);
|
||||
__entry->status = ext4_es_status(es);
|
||||
),
|
||||
|
||||
@ -2425,7 +2425,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->lblk = es->es_lblk;
|
||||
__entry->len = es->es_len;
|
||||
__entry->pblk = ext4_es_pblock(es);
|
||||
__entry->pblk = ext4_es_show_pblock(es);
|
||||
__entry->status = ext4_es_status(es);
|
||||
__entry->found = found;
|
||||
),
|
||||
@ -2593,7 +2593,7 @@ TRACE_EVENT(ext4_es_insert_delayed_block,
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->lblk = es->es_lblk;
|
||||
__entry->len = es->es_len;
|
||||
__entry->pblk = ext4_es_pblock(es);
|
||||
__entry->pblk = ext4_es_show_pblock(es);
|
||||
__entry->status = ext4_es_status(es);
|
||||
__entry->allocated = allocated;
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user