Re: [PATCH v2 0/6] btrfs: speedup directory logging/fsync by copying index keys only
From: David Sterba <hidden>
Date: 2021-10-25 19:57:57
On Mon, Oct 25, 2021 at 05:31:48PM +0100, fdmanana@kernel.org wrote:
From: Filipe Manana <redacted>
This patchset reworks directory logging to make it copy only the dir index
keys, instead of copying both dir index keys and dir item keys, as both have
the same type of information. This reduces the amount of logged metadata by
about half, and therefore we do about half of the cpu bound work, half of
the IO and use less log tree space (except for very small directories).
This will allow other optimizations to build on top, some of which are only
possible after this change, while others become easier and less cumbersome
to implement after this change. Performance tests are in the changelog of
patch 5/6. Patch 6/6 only removes code that deals with dir item keys when
replaying directory deletions and it could have been squashed into patch
5/6, but since that one is already large and works without 6/6, I opted
to make it separate to make it easier to review.
Also, after this change we are still able to correctly replay a log tree
generated by an old kernel, and an old kernel is also able to correctly
replay a log tree generated by a kernel that has this patchset applied.
I'm sending this close to the 5.16 merge window, but my intention is to
have it only for the next merge window (5.17).
V2: Updated changelog of patch 5/6 to make it more clear why backward
and forward compatibility are guaranteed.
Filipe Manana (6):
btrfs: remove root argument from drop_one_dir_item()
btrfs: remove root argument from btrfs_unlink_inode()
btrfs: remove root argument from add_link()
btrfs: remove root argument from check_item_in_log()If you want, I can add the first 4 patches to misc-next still queued for 5.16 pull next week, it's fairly trivial and you won't have to refresh the patches. For preparatory patches like this it's free pass even before merge window.