在 2025/10/24 19:25, Filipe Manana 写道: [...]
If there's no backref in the extent tree and no delayed ref for tree block A then we already have a corrupted fs.
Yes I know.
Even after a transaction aborts, it's ok, but pointless, to allocate extents and trigger writeback for them.
Writeback can be triggered by a lot of other reasons, e.g. memory pressure, and in that case if we try to writeback tree block B, it will overwrite tree block A even if it's after transaction abort.
It doesn't matter why and when the writeback is triggered, that was not my point. My point was if a transaction was aborted, what matters is that we can't commit that transaction or start a new one, and can't override existing extents (either they are used or pinned).
My point is, your last point (can't override existing extents) is not guaranteed especially after a transaction is aborted, which can be caused by corrupted fs.
Yes, the initial fs can be corrupted, but it doesn't mean we're free to make it more corrupted.
Thanks, Qu