btrfs: async discard support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest22 patches 26 repliesIn review
- v522 patches 1 replySuperseded
- v422 patches 2 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 22 patches | 2 replies | Superseded | |
| v2 | 22 patches | 17 replies | Superseded | |
| v1 RFC | 19 patches | 51 replies | Superseded |
Changes in v6 from the cover letter
- Move the fully trimmed check outside of the block_group lock.
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/22 | bitmap: genericize percpu bitmap region iteratorsinclude/ mm/ | +51 | 0 replies | |
| 2/22 | btrfs: rename DISCARD opt to DISCARD_SYNCfs/ fs/ fs/ +2 more | +8 | 0 replies | |
| 3/22 | btrfs: keep track of which extents have been discardedfs/ fs/ fs/ | +80 | 0 replies | |
| 4/22 | btrfs: keep track of cleanliness of the bitmapfs/ fs/ | +94 | 0 replies | |
| 5/22 | btrfs: add the beginning of async discard, discard workqueuefs/ fs/ fs/ +9 more | +474 | 0 replies | |
| 6/22 | btrfs: handle empty block_group removalfs/ fs/ fs/ +4 more | +213 | 0 replies | |
| 7/22 | btrfs: discard one region at a time in async discardfs/ fs/ fs/ +1 more | +192 | 0 replies | |
| 8/22 | btrfs: add removal calls for sysfs debug/fs/ | +7 | 1 reply | |
| 9/22 | btrfs: make UUID/debug have its own kobjectfs/ fs/ | +20 | 1 reply | |
| 10/22 | btrfs: add discard sysfs directoryfs/ fs/ | +27 | 1 reply | |
| 11/22 | btrfs: track discardable extents for async discardfs/ fs/ fs/ +3 more | +160 | 0 replies | |
| 12/22 | btrfs: keep track of discardable_bytesfs/ fs/ fs/ +2 more | +56 | 0 replies | |
| 13/22 | btrfs: calculate discard delay based on number of extentsfs/ fs/ fs/ +2 more | +86 | 2 replies | |
| 14/22 | btrfs: add bps discard rate limitfs/ fs/ fs/ | +51 | 2 replies | |
| 15/22 | btrfs: limit max discard size for async discardfs/ fs/ | +41 | 3 replies | |
| 16/22 | btrfs: make max async discard size tunablefs/ fs/ fs/ +1 more | +45 | 2 replies | |
| 17/22 | btrfs: have multiple discard listsfs/ fs/ fs/ +2 more | +140 | 0 replies | |
| 18/22 | btrfs: only keep track of data extents for async discardfs/ fs/ | +15 | 2 replies | |
| 19/22 | btrfs: keep track of discard reuse statsfs/ fs/ fs/ +1 more | +60 | 2 replies | |
| 20/22 | btrfs: add async discard headerfs/ | +35 | 0 replies | |
| 21/22 | btrfs: increase the metadata allowance for the free_space_cachefs/ | +11 | 0 replies | |
| 22/22 | btrfs: make smaller extents more likely to go into bitmapsfs/ | +2 | 0 replies |
Reviews trailers per patch
17 of 22 patches have a Reviewed-by or Acked-by.
| Patch | Josef Bacik | Johannes Thumshirn | Anand Jain |
|---|---|---|---|
| 1/22 | R-b | ||
| 2/22 | R-b | R-b | |
| 3/22 | |||
| 4/22 | R-b | ||
| 5/22 | R-b | ||
| 6/22 | R-b | ||
| 7/22 | R-b | ||
| 8/22 | R-b | R-b | |
| 9/22 | R-b | R-b | |
| 10/22 | R-b | R-b | |
| 11/22 | |||
| 12/22 | |||
| 13/22 | R-b | ||
| 14/22 | |||
| 15/22 | R-b | ||
| 16/22 | |||
| 17/22 | R-b | ||
| 18/22 | R-b | ||
| 19/22 | R-b | ||
| 20/22 | R-b | ||
| 21/22 | R-b | ||
| 22/22 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v6 00/22] btrfs: async discard support
Hello,
Dave reported a lockdep issue [1]. I'm a bit surprised as I can't repro it, but it obviously is right. I believe I fixed the issue by moving the fully trimmed check outside of the block_group lock. I mistakingly thought the btrfs_block_group lock subsumed btrfs_free_space_ctl tree_lock. This clearly isn't the case.
Changes in v6:
- Move the fully trimmed check outside of the block_group lock.
v5 is available here: [2].
This series is on top of btrfs-devel#misc-next 7ee98bb808e2 + [3] and [4].
[1] https://lore.kernel.org/linux-btrfs/[email protected]/
[2] https://lore.kernel.org/linux-btrfs/[email protected]/
[3] https://lore.kernel.org/linux-btrfs/d934383ea528d920a95b6107daad6023b516f0f4.1576109087.git.dennis@kernel.org/
[4] https://lore.kernel.org/linux-btrfs/[email protected]/
Dennis Zhou (22):
bitmap: genericize percpu bitmap region iterators
btrfs: rename DISCARD opt to DISCARD_SYNC
btrfs: keep track of which extents have been discarded
btrfs: keep track of cleanliness of the bitmap
btrfs: add the beginning of async discard, discard workqueue
btrfs: handle empty block_group removal
btrfs: discard one region at a time in async discard
btrfs: add removal calls for sysfs debug/
btrfs: make UUID/debug have its own kobject
btrfs: add discard sysfs directory
btrfs: track discardable extents for async discard
btrfs: keep track of discardable_bytes
btrfs: calculate discard delay based on number of extents
btrfs: add bps discard rate limit
btrfs: limit max discard size for async discard
btrfs: make max async discard size tunable
btrfs: have multiple discard lists
btrfs: only keep track of data extents for async discard
btrfs: keep track of discard reuse stats
btrfs: add async discard header
btrfs: increase the metadata allowance for the free_space_cache
btrfs: make smaller extents more likely to go into bitmaps
fs/btrfs/Makefile | 2 +- fs/btrfs/block-group.c | 87 ++++- fs/btrfs/block-group.h | 30 ++ fs/btrfs/ctree.h | 52 ++- fs/btrfs/discard.c | 684 ++++++++++++++++++++++++++++++++++++ fs/btrfs/discard.h | 42 +++ fs/btrfs/disk-io.c | 15 +- fs/btrfs/extent-tree.c | 8 +- fs/btrfs/free-space-cache.c | 611 +++++++++++++++++++++++++++----- fs/btrfs/free-space-cache.h | 41 ++- fs/btrfs/inode-map.c | 13 +- fs/btrfs/inode.c | 2 +- fs/btrfs/scrub.c | 7 +- fs/btrfs/super.c | 39 +- fs/btrfs/sysfs.c | 205 ++++++++++- fs/btrfs/volumes.c | 7 + include/linux/bitmap.h | 35 ++ mm/percpu.c | 61 +--- 18 files changed, 1789 insertions(+), 152 deletions(-) create mode 100644 fs/btrfs/discard.c create mode 100644 fs/btrfs/discard.h
Thanks,
Dennis