1. mount the Linux filesystems on the loopback using mount options -o loop,sync
2. modify ntfs3g with the attached debdiff which adds a -o syncio mount option to open the NTFS device using O_SYNC, e.g.
this makes all ntfs dirty writes to get written back synchronously.
3. don't use the sysctl's
I've tested an ext3 file system mounted via the loopback with -o sync (point 1 above) and used my patched ntfs3g with the -o syncio mount option and using vmstat 1 shows that I/O is flushed immediately, reducing the possibility of file system corruption on power outages.
I've looked at the sysctl's again and think there is a cleaner solution than using:
sysctl -w vm.dirty_ background_ ratio=0 expire_ centisecs= 2 writeback_ centisecs= 2
sysctl -w vm.dirty_ratio=40
sysctl -w vm.dirty_
sysctl -w vm.dirty_
1. mount the Linux filesystems on the loopback using mount options -o loop,sync
2. modify ntfs3g with the attached debdiff which adds a -o syncio mount option to open the NTFS device using O_SYNC, e.g.
ntfs-3g /path/to/ ntfs-test. img /path/to/mountpoint -o syncio
this makes all ntfs dirty writes to get written back synchronously.
3. don't use the sysctl's
I've tested an ext3 file system mounted via the loopback with -o sync (point 1 above) and used my patched ntfs3g with the -o syncio mount option and using vmstat 1 shows that I/O is flushed immediately, reducing the possibility of file system corruption on power outages.