On 03/04/2024 00:28, Dave Chinner wrote:
Extent alignment is currently driven by multiple variables that come
from different sources and are applied at different times. Stripe
alignment currently defines the extent start alignment, whilst
extent size hints only affect the extent length and not the start
alignment.
BTW, I have been testing stripe alignment for this series vs mainline
(v6.9-rc1), and I find that I more often get stripe-aligned extents with
this series. I guess that you expected that.
However, we do seem to make more trips into the block allocator for
that. For example, writing a new file with 6014 blocks and sunit=16:
this series bmap:
File size of /root/mnt2/file_48 is 24630784 (6014 blocks of 4096 bytes)
/root/mnt2/file_48:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..48111]: 547456..595567 1 (240768..288879) 48112 000111
The block allocator gave 1x 6014 block
mainline:
/root/mnt2/file_48:
EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL FLAGS
0: [0..48111]: 547440..595551 1 (240752..288863) 48112 001111
The block allocator gave 1x 6000 and 1x 14 blocks, which are contiguous.
Let me know if you want more details on this. Obviously more often
aligned extents is nice, but more trips to the block allocator isn't.
Thanks,
John