Re: [PATCH v3 1/5] btrfs: replace stripe extents
From: Johannes Thumshirn
Date: Tue Jul 02 2024 - 01:41:35 EST
On 01.07.24 22:37, Josef Bacik wrote:
>> + if (ret == -EEXIST)
>> + ret = replace_raid_extent_item(trans, &stripe_key,
>> + stripe_extent, item_size);
>
> I had another thought, how often is this particular thing happening? Bec ause
> we're doing 3 path allocations here in the worst case. If it happens more than
> say 10% of the time then we need to allocate a path once in
> btrfs_insert_one_raid_extent(), do the insert, and if it fails re-use that path
> to do the delete and insert the new one. Thanks,
That indeed is a good question. I'll add some tracepoints to see how
often this is getting called.