diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-12-04 16:20:29 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-12-15 22:59:01 +0100 |
commit | 00deaf04df35536d192544ea57b6da9a88519422 (patch) | |
tree | bfc4c8a97bdaddd7f3bd2542fa5cd3b34bd6c92b /fs/btrfs/extent_map.h | |
parent | d224d2ef959a768fc88242224d8527e5f88789b6 (diff) |
btrfs: log messages at unpin_extent_range() during unexpected cases
At unpin_extent_range() we trigger a WARN_ON() when we don't find an
extent map or we find one with a start offset not matching the start
offset of the target range. This however isn't very useful for debugging
because:
1) We don't know which condition was triggered, as they are both in the
same WARN_ON() call;
2) We don't know which inode was affected, from which root, for which
range, what's the start offset of the extent map, and so on.
So trigger a separate warning for each case and log a message for each
case providing information about the inode, its root, the target range,
the generation and the start offset of the extent map we found.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_map.h')
-rw-r--r-- | fs/btrfs/extent_map.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h index 5663137471fe..cd1a9115908d 100644 --- a/fs/btrfs/extent_map.h +++ b/fs/btrfs/extent_map.h @@ -82,7 +82,7 @@ struct extent_map *alloc_extent_map(void); void free_extent_map(struct extent_map *em); int __init extent_map_init(void); void __cold extent_map_exit(void); -int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, u64 gen); +int unpin_extent_cache(struct btrfs_inode *inode, u64 start, u64 len, u64 gen); void clear_em_logging(struct extent_map_tree *tree, struct extent_map *em); struct extent_map *search_extent_mapping(struct extent_map_tree *tree, u64 start, u64 len); |