Skip to content

RFC xfs: forced extent alignment

Dave Chinner linux-block linux-fsdevel linux-xfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfs: simplify extent allocation alignmentfs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_alloc.h fs/xfs/libxfs/xfs_bmap.c+44 -5610 replies
2/3xfs: make EOF allocation simplerfs/xfs/libxfs/xfs_bmap.c fs/xfs/libxfs/xfs_ialloc.c fs/xfs/xfs_trace.h+62 -850 replies
3/3xfs: introduce forced allocation alignmentfs/xfs/libxfs/xfs_alloc.h fs/xfs/libxfs/xfs_bmap.c fs/xfs/xfs_inode.h+29 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] xfs: forced extent alignment

Hi Garry,

I figured that it was simpler just to write the forced extent alignment allocator patches that to make you struggle through them and require lots of round trips to understand all the weird corner cases.

The following 3 patches:

- rework the setup and extent allocation logic a bit to make force aligned allocation much easier to implement and understand
- move all the alignment adjustments into the setup logic
- rework the alignment slop calculations and greatly simplify the the exact EOF block allocation case
- add a XFS_ALLOC_FORCEALIGN flag so that the inode config only needs to be checked once at setup. This also allows other allocation types (e.g. inode clusters) use forced alignment allocation semantics in future.
- clearly document when we are turning off allocation alignment and abort FORCEALIGN allocation at that point rather than doing unaligned allocation.

I've run this through fstests once so it doesn't let the smoke out, but I haven't actually tested it against a stripe aligned filesystem config yet, nor tested the forcealign functionality so it may not be exactly right yet.

Is this sufficiently complete for you to take from here into the forcealign series?

Cheers,

Dave.