On Fri, Jun 07, 2019 at 10:52:43AM -0700, Russ Allbery wrote: > Adam Borowski <kilob...@angband.pl> writes: > > > There are two massive recent improvements: > > * eatmydata helps a lot, and eating a power-lossed install is not a loss > > We did an experiment at work about four years ago with using eatmydata > inside a D-I run, and had to revert because we ran into no end of problems > with zero-length files after the first system reboot, even though we did > an explicit sync before reboot. > > This is potentially obsolete data (this was with Ubuntu 12.04, IIRC), but > it's made me fairly cautious of eatmydata ever since. > > Also, I think your proposal is not to use LD_PRELOAD and other hacks but > to instead have a native package installation mode that understands when > to sync, and perhaps that wouldn't have the same behavior.
Yeah, I use archive_write_disk (going to drop it probably, though), and ordinary write(). Not even a single mmap() to write or anything fancy -- libarchive doesn't write into user-provided buffers so dax shenanigans or such won't get us anything; can just let the kernel write() without bothering to optimize. If a filesystem can screw sync() after a bunch of plain open() write() close()s, there's nothing you can sanely do. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Sometimes you benefit from delegating stuff. For example, ⢿⡄⠘⠷⠚⠋⠀ this way I get to be a vegetarian. ⠈⠳⣄⠀⠀⠀⠀