Page MenuHomeFreeBSD

ufs: add O_DSYNC support
ClosedPublic

Authored by tmunro on Jun 5 2020, 10:15 PM.

Details

Reviewers
kib
mjg
mckusick
Summary

Building on top of D25090, here is a patch to teach UFS to understand O_DSYNC.

Test Plan

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

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

tmunro created this revision.

I am not sure what you see in dtrace, but I see a bug in ffs_write() regardless of IO_DATASYNC. D25404

tmunro edited the summary of this revision. (Show Details)
tmunro edited the test plan for this revision. (Show Details)

Rebased. Previous confusion turned out to be explained by problems fixed by D27353 and problems in my test methodology.

This revision is now accepted and ready to land.Jan 6 2021, 1:44 PM