]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ext4: adjust the debug info in ext4_es_cache_extent()
authorZhang Yi <yi.zhang@huawei.com>
Sat, 29 Nov 2025 10:32:44 +0000 (18:32 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Jan 2026 16:23:33 +0000 (11:23 -0500)
Print a trace point after successfully inserting an extent in the
ext4_es_cache_extent() function. Additionally, similar to other extent
cache operation functions, call ext4_print_pending_tree() to display the
extent debug information of the inode when in ES_DEBUG mode.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Message-ID: <20251129103247.686136-13-yi.zhang@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents_status.c

index 48f04aef2f2e1cd2e81f271e74d0db0ef402aa17..0529c603ee88f9ca63a6db148707abfe584518c0 100644 (file)
@@ -1039,7 +1039,6 @@ void ext4_es_cache_extent(struct inode *inode, ext4_lblk_t lblk,
        newes.es_lblk = lblk;
        newes.es_len = len;
        ext4_es_store_pblock_status(&newes, pblk, status);
-       trace_ext4_es_cache_extent(inode, &newes);
 
        if (!len)
                return;
@@ -1065,6 +1064,8 @@ void ext4_es_cache_extent(struct inode *inode, ext4_lblk_t lblk,
                }
        }
        __es_insert_extent(inode, &newes, NULL);
+       trace_ext4_es_cache_extent(inode, &newes);
+       ext4_es_print_tree(inode);
 unlock:
        write_unlock(&EXT4_I(inode)->i_es_lock);
        if (!conflict)