btrfs: move ordered extents cleanup to where they got allocated
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: extract the nocow ordered extent and extent map generation into a helperfs/ | +69 | 1 reply | |
| 2/2 | btrfs: move ordered extent cleanup to where they are allocatedfs/ | +42 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Boris Burkov |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] btrfs: move ordered extents cleanup to where they got allocated
Currently ordered extents cleanup is delayed, e.g:
Cow_file_range() and run_delalloc_nocow() all can allocate ordered extents by themselves.
But the ordered extents cleanup is not happending in those functions, but at the caller, btrfs_run_delalloc_range().
This is not the common practice, and has already caused various ordered extent double accounting (fixed by the recent error handling patchset).
So this series will address the problem by:
- Refactor run_delalloc_nocow() to extract the NOCOW ordered extents creation
To make later error handling a little simpler.
- Move ordered extents cleanup to where they got created There are 3 call sites:
- cow_file_range()
This is the simplest one, as the recent fix makes it pretty straight forward.
- nocow_one_range()
The new helper introduced to created ordered extents and extent maps for NOCOW writes.
This is also pretty straightforward
- run_delalloc_nocow()
There are 3 different error cases that needs to adjust the ordered extents cleanup range.
Qu Wenruo (2):
btrfs: extract the nocow ordered extent and extent map generation into
a helper
btrfs: move ordered extent cleanup to where they are allocated
fs/btrfs/inode.c | 188 +++++++++++++++++++++++++++-------------------- 1 file changed, 107 insertions(+), 81 deletions(-)
Signature · 1 line
2.47.1