btrfs: speedup directory logging/fsync by copying index keys only
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 4 repliesIn review
- v16 patches 3 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | btrfs: remove root argument from drop_one_dir_item()fs/ | +4 | 0 replies | |
| 2/6 | btrfs: remove root argument from btrfs_unlink_inode()fs/ fs/ fs/ | +18 | 0 replies | |
| 3/6 | btrfs: remove root argument from add_link()fs/ | +3 | 0 replies | |
| 4/6 | btrfs: remove root argument from check_item_in_log()fs/ | +2 | 0 replies | |
| 5/6 | btrfs: only copy dir index keys when logging a directoryfs/ fs/ | +182 | 0 replies | |
| 6/6 | btrfs: remove no longer needed logic for replaying directory deletesfs/ include/ | +72 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Josef Bacik |
|---|---|
| Series | R-b |
| 1/6 | |
| 2/6 | |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] btrfs: speedup directory logging/fsync by copying index keys only
From: Filipe Manana <[email protected]>
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()
btrfs: only copy dir index keys when logging a directory
btrfs: remove no longer needed logic for replaying directory deletes
fs/btrfs/btrfs_inode.h | 18 +- fs/btrfs/ctree.h | 1 - fs/btrfs/inode.c | 25 +- fs/btrfs/tree-log.c | 582 ++++++++++++++------------------ include/uapi/linux/btrfs_tree.h | 4 +- 5 files changed, 280 insertions(+), 350 deletions(-)
Signature · 1 line
2.33.0