summaryrefslogtreecommitdiff
path: root/fs/btrfs/raid-stripe-tree.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2023-09-14 19:07:05 +0300
committerDavid Sterba <dsterba@suse.com>2023-10-12 17:44:10 +0300
commitb5e2c2ff67d2c88ee2b3f4f22ef4426cfb35ec06 (patch)
tree05f8fe70237e205e0cdb36f5f3c1c4138789e922 /fs/btrfs/raid-stripe-tree.c
parent9f9918a8017b7925da2fad16b4ccf6a14630f03e (diff)
downloadlinux-b5e2c2ff67d2c88ee2b3f4f22ef4426cfb35ec06.tar.xz
btrfs: tracepoints: add events for raid stripe tree
Add trace events for raid-stripe-tree operations. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid-stripe-tree.c')
-rw-r--r--fs/btrfs/raid-stripe-tree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index a4451452ab68..944e8f1862aa 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -59,6 +59,9 @@ int btrfs_delete_raid_extent(struct btrfs_trans_handle *trans, u64 start, u64 le
if (found_end <= start)
break;
+ trace_btrfs_raid_extent_delete(fs_info, start, end,
+ found_start, found_end);
+
ASSERT(found_start >= start && found_end <= end);
ret = btrfs_del_item(trans, stripe_root, path);
if (ret)
@@ -90,6 +93,8 @@ static int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans,
return -ENOMEM;
}
+ trace_btrfs_insert_one_raid_extent(fs_info, bioc->logical, bioc->size,
+ num_stripes);
btrfs_set_stack_stripe_extent_encoding(stripe_extent, encoding);
for (int i = 0; i < num_stripes; i++) {
u64 devid = bioc->stripes[i].dev->devid;
@@ -242,6 +247,9 @@ int btrfs_get_raid_extent_offset(struct btrfs_fs_info *fs_info,
stripe->physical = physical + offset;
+ trace_btrfs_get_raid_extent_offset(fs_info, logical, *length,
+ stripe->physical, devid);
+
ret = 0;
goto free_path;
}