haiku/src/system
Augustin Cavalier 74e882b39b kernel/fs: Flush the underlying device's write cache as part of sync().
BFS does this as part of journal management, but not as part of block
cache synchronization (which makes sense, as flushing it then would
defeat the purpose of the drive's write cache.) No other file system
seems to touch it at all, so we should do it as part of an explicit sync.

This may help with some of the filesystem corruption issues, as it seems
that on slow disks, the drive might not have enough time to flush the cache
before it is powered off (or on some SATA/AHCI based disks, it is not flushed
before close at all), so triggering it here and, as the ioctl is supposed to be
synchronous, waiting for it also, seems to make sense.

Change-Id: I7d9992c21ca4b59c839711dcc96c973b4b8df052
Reviewed-on: https://review.haiku-os.org/530
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-11 20:06:58 +00:00
..
boot EFI: Use proper mnemnoic for retf (lret) to appease Clang. 2018-09-08 18:56:33 -04:00
glue system/glue: Add a crtbegin and crtend implementation. 2018-08-14 16:07:03 -04:00
kernel kernel/fs: Flush the underlying device's write cache as part of sync(). 2018-09-11 20:06:58 +00:00
ldscripts kernel: Binary code patches on x86. 2018-01-14 13:20:38 +01:00
libroot libroot: Fix handling of debugger() call in abort(). 2018-09-02 00:13:40 -04:00
runtime_loader x86_64: R_X86_64_PC32 and R_X86_64_DTPOFF32 are 32-bit wide relocations. 2018-08-15 16:16:20 +00:00
Jamfile