3 ms·
I have an answer, but I'm not sure you'll find it particularly fulfilling because it is quite hypothetical. The average user just needs to be able to ask the q
by qiqitori 3y ago
I have an answer, but I'm not sure you'll find it particularly fulfilling because it is quite hypothetical.
The average user just needs to be able to ask the question in a decent place. E.g., Hacker News or a fitting Stack Exchange site. Some developers not afraid of touching the kernel will see the question (or one like it), and if no workaround (e.g. truncation) is found to be acceptable, someone may decide to look into the kernel source to see if it's feasible at all. They may find a lower level function that deletes without writing metadata. Or they may find the function in the filesystem driver's source code where the metadata is written first, and if that was successful, the actual data is written. In the easiest case, you could create a copy of the function with the calls swapped, and a live CD with the modified driver could be created. (Course, this solution is quite unsafe, as writing the metadata could still fail for some other or related reason, so it's a bit of an emergency solution.)
There are two other filesystems that were mentioned in the discussion here, btrfs and ZFS.
ZFS solved the problem by reserving space, so creating such a tool isn't needed. (However, ZFS is not part of Linux, so I'm not too interested in digging into the details.)
btrfs users apparently accept this as a fact-of-life, but have what they consider decent-enough workarounds, see e.g. https://www.reddit.com/r/btrfs/comments/ibjrpm/can_i_somehow_reserve_space_to_prevent_the_btrfs/ https://www.reddit.com/r/btrfs/comments/ibjrpm/can_i_somehow....
(I use neither ZFS nor btrfs; I prefer boring filesystems, thank you very much.)