RFC ext4: Add extsize support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 RFC Latest7 patches 0 repliesNew
- v3 RFC11 patches 0 repliesSuperseded
- v2 RFC6 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 5 patches | 7 replies | Superseded |
Changes in v4 from the cover letter
- removed forcealign patches so we can independently review extsize and then build on that later
- refactored previous implementation of ext4_map_query/create_blocks to use EXT4_EX_QUERY_FILTER
- removed some extra warn ons that were expected to hit in certain cases
[1] RFC v3: https://lore.kernel.org/linux-ext4/[email protected]/
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | ext4: add aligned allocation hint in mballocfs/ fs/ include/ | +55 | 0 replies | |
| 2/7 | ext4: allow inode preallocation for aligned allocfs/ | +63 | 0 replies | |
| 3/7 | ext4: support for extsize hint using FS_IOC_FS(GET/SET)XATTRfs/ fs/ fs/ +1 more | +218 | 0 replies | |
| 4/7 | ext4: pass lblk and len explicitly to ext4_split_extent*()fs/ | +30 | 0 replies | |
| 5/7 | ext4: add extsize hint supportfs/ fs/ fs/ +1 more | +497 | 0 replies | |
| 6/7 | ext4: make extsize work with EOF allocationsfs/ | +6 | 0 replies | |
| 7/7 | ext4: add ext4_map_blocks_extsize() wrapper to handle overwritesfs/ | +43 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [RFC v4 0/7] ext4: Add extsize support
This is the v4 for adding extsize support in ext4. extsize is primarily being implemented as a building block to eventually support multiblock atomic writes in ext4 without having to reformat the filesystem with bigalloc. The long term goal behind implementing extsize is two fold:
1. We eventually want to give users a way to perform atomic writes without needing a FS reformat to bigalloc.
- this can be achieved via configurations like extsize + software fallback or extsize + forcealign. (More about forcealign can be found in previous RFC [1])
2. We want to implement a software atomic write fallback for ext4 (just like XFS) and at the same time we want to give users the choice of whether they want only HW accelerated (fast) atomic writes or are they okay with falling back to software emulation (slow). Wanting to opt out of SW fallback was also a point raised by some attendees in LSFMM.
a) For users wanting guaranteed HW atomic writes, we want to implement extsize + forcealign. This ensures atomic writes are always HW accelerated however the write is bound to fail if the allocator can't guarantee HW acceleration for any reason (eg no aligned blocks available).
b) For users which prefer software fallback rather than failing the write, we want to implement extsize + software fallback. extsize ensures we try to get aligned blocks for HW accelerated atomic writes on best effort basis, and SW fallback ensures we don't fail the write in case HW atomic writes are not possible. This is inline with how XFS has implemented multi block atomic writes.
The above approach helps ext4 provide more choice to the user about how they want to perform the write based on what is more suitable for their workload.
Both the approaches need extsize as a building block for the solutions hence we are pushing the extsize changes separately and once community is happy with these we can work on the next steps.
changes in v4 :
- removed forcealign patches so we can independently review extsize and then build on that later
- refactored previous implementation of ext4_map_query/create_blocks to use EXT4_EX_QUERY_FILTER
- removed some extra warn ons that were expected to hit in certain cases
[1] RFC v3: https://lore.kernel.org/linux-ext4/[email protected]/
Testing: I've tested with xfstests auto and don't see any regressions. Also tested with internal extsize related tests that I plan to upstream soon.
Ojaswin Mujoo (7):
ext4: add aligned allocation hint in mballoc
ext4: allow inode preallocation for aligned alloc
ext4: support for extsize hint using FS_IOC_FS(GET/SET)XATTR
ext4: pass lblk and len explicitly to ext4_split_extent*()
ext4: add extsize hint support
ext4: make extsize work with EOF allocations
ext4: add ext4_map_blocks_extsize() wrapper to handle overwrites
fs/ext4/ext4.h | 15 +- fs/ext4/ext4_jbd2.h | 15 ++ fs/ext4/extents.c | 229 ++++++++++++++--- fs/ext4/inode.c | 485 ++++++++++++++++++++++++++++++++---- fs/ext4/ioctl.c | 122 +++++++++ fs/ext4/mballoc.c | 123 +++++++-- fs/ext4/super.c | 1 + include/trace/events/ext4.h | 1 + 8 files changed, 881 insertions(+), 110 deletions(-)
Signature · 1 line
2.49.0