I did my own quick PoC to use CoW for misaligned blocks atomic writesOf course - I'm pretty sure this needs force-align to ensure that
fallback.
I am finding that the block allocator is often giving misaligned blocks wrt
atomic write length, like this:
the large allocated extent is aligned to file offset and hardware
atomic write alignment constraints....
Since we are not considering forcealign ATM, can we still consider somePerhaps we should finish off the the remaining bits needed to make
other alignment hint to the block allocator? It could be similar to how
stripe alignment is handled.
force-align work everywhere before going any further?
Some other thoughts:What statx exposes should be the size/alignment for hardware offload
- I am not sure what atomic write unit max we would now use.
to take place (i.e. no change)
, regardless of what the filesystem
can do software offloads for. i.e. like statx->stx_blksize is the
"preferred block size for efficient IO", the atomic write unit
information is the "preferred atomic write size and alignment for
efficient IO", not the maximum sizes supported...
- Anything written back with CoW/exchange range will need FUA to ensure thatI don't think so. The journal commit for the exchange range
the write is fully persisted.
operation will issue a cache flush before the journal IO is
submitted. that will make the new data stable before the first
xchgrange transaction becomes stable.
Hence we get the correct data/metadata ordering on stable storage
simply by doing the exchange-range operation at data IO completion.
This the same data/metadata ordering semantics that unwritten extent
conversion is based on....