Use global rsv stealing for evict and clean things up
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest7 patches 10 repliesIn review
- v24 patches 0 repliesSuperseded
- v14 patches 5 repliesSuperseded
Changes in v3 from the cover letter
- Nikolay suggested an additional cleanup, which lead to multiple other cleanups and small fixes.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | btrfs: handle priority ticket failures in their respective helpersfs/ | +21 | 1 reply | |
| 2/7 | btrfs: check for priority ticket granting before flushingfs/ | +8 | 6 replies | |
| 3/7 | btrfs: check ticket->steal in steal_from_global_block_rsvfs/ | +5 | 1 reply | |
| 4/7 | btrfs: make BTRFS_RESERVE_FLUSH_EVICT use the global rsv stealing codefs/ fs/ | +19 | 1 reply | |
| 5/7 | btrfs: remove global rsv stealing logic for orphan cleanupfs/ | +0 | 0 replies | |
| 6/7 | btrfs: get rid of root->orphan_cleanup_statefs/ fs/ fs/ | +3 | 0 replies | |
| 7/7 | btrfs: change root to fs_info for btrfs_reserve_metadata_bytesfs/ fs/ fs/ +10 more | +33 | 0 replies |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Nikolay Borisov |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | R-b |
| 5/7 | R-b |
| 6/7 | R-b |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/7] Use global rsv stealing for evict and clean things up
v2->v3:
- Nikolay suggested an additional cleanup, which lead to multiple other cleanups and small fixes.
v1->v2:
- Reworked the stealing logic to be inside of the priority metadata loop, since that's the part we care about.
- Renamed the helper to see if we can steal to can_steal.
- Added Nikolay's reviewed-by's.
--- Original email ---
Hello,
While trying to remove direct access of fs_info->extent_root I noticed we were passing root into btrfs_reserve_metadata_bytes() for the sole purpose of stealing from the global reserve if we were doing orphan cleanup. This isn't really necessary anymore, but I needed to clean up a few things
1) We have global reserve stealing logic in the flushing code now that does the proper ordering already. We just hadn't converted evict to this yet, so I've done that.
2) Since we already do the global reserve stealing as a part of the reservation process we don't need the extra check to steal from the global reserve if we fail to make our reservation during orphan cleanup.
3) Since we no longer need this logic we don't need the orphan_cleanup_state bit in the root so we can remove that.
4) Finally with all of this removed we don't have a need for root in btrfs_reserve_metadata_bytes(), so change it to fs_info and change it's main callers as well.
With that we've got more consistent global reserve stealing handling in evict, and I've cleaned up the reservation path so I no longer have to worry about a couple of places where we were doing btrfs_reserve_metadata_bytes(root->extent_root). Thanks,
Josef Bacik (7):
btrfs: handle priority ticket failures in their respective helpers
btrfs: check for priority ticket granting before flushing
btrfs: check ticket->steal in steal_from_global_block_rsv
btrfs: make BTRFS_RESERVE_FLUSH_EVICT use the global rsv stealing code
btrfs: remove global rsv stealing logic for orphan cleanup
btrfs: get rid of root->orphan_cleanup_state
btrfs: change root to fs_info for btrfs_reserve_metadata_bytes
fs/btrfs/block-group.c | 2 +- fs/btrfs/block-rsv.c | 12 +++--- fs/btrfs/block-rsv.h | 4 +- fs/btrfs/ctree.h | 9 +---- fs/btrfs/delalloc-space.c | 2 +- fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/delayed-ref.c | 4 +- fs/btrfs/disk-io.c | 1 - fs/btrfs/inode.c | 21 ++++------ fs/btrfs/props.c | 5 ++- fs/btrfs/relocation.c | 17 ++++---- fs/btrfs/root-tree.c | 2 +- fs/btrfs/space-info.c | 84 +++++++++++++++++++++------------------ fs/btrfs/space-info.h | 2 +- fs/btrfs/transaction.c | 4 +- 15 files changed, 86 insertions(+), 85 deletions(-)
Signature · 1 line
2.26.3