Building on top of D25090, here is a patch to teach UFS to understand O_DSYNC.
Details
Details
Using a test program at https://github.com/macdice/some-io-tests/blob/master/sync.c and watching IO with dwatch -X io, we can verify that O_DSYNC updates the inode only when fdatasync would (eg for size change, but not for overwrite).
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
I am not sure what you see in dtrace, but I see a bug in ffs_write() regardless of IO_DATASYNC. D25404
Comment Actions
Rebased. Previous confusion turned out to be explained by problems fixed by D27353 and problems in my test methodology.