On Wed, Sep 19, 2018 at 09:00:57AM +1000, Dave Chinner wrote: > > Careful. We already have issues because delalloc blocks before EOF don't > > ever get reclaimed. This triggers up on xfs/442 with 1k blocksize for > > me. I actually have a fix for that now, but that will require dropping > > one of the cleanup patches from this series, so expect a respin. > > Yeah, I didn't say everything already worked, just that using > preallocation for delalloc gets rid of the stale data exposure > problem that has prevented us from doing this in the past. And I think I have to do the mark preallocations as unwritten now given that my other fix idea that I wasted the whole day on yesterday didn't turn out to actually work properly. Sigh.. > That's sounds like a good idea, and a good direction to head > towards. No immediate hurry, just trying to understand where you > might be going with these changes. I've been working on adding (or resurrecting) and always_cow mode, which helped to expose all kinds of interesting bugs. That mode again will be that base for atomic writes (including safe overwrites) and a zone block device (aka SMR) mode that also can't write in place.