Page MenuHomeFreeBSD

ufs: add O_DSYNC support
ClosedPublic

Authored by tmunro on Jun 5 2020, 10:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 8 2024, 7:41 PM
Unknown Object (File)
Dec 20 2023, 6:06 AM
Unknown Object (File)
Dec 10 2023, 10:18 PM
Unknown Object (File)
Oct 20 2023, 11:19 AM
Unknown Object (File)
Oct 10 2023, 7:53 PM
Unknown Object (File)
Sep 17 2023, 12:22 PM
Unknown Object (File)
Sep 6 2023, 9:50 AM
Unknown Object (File)
Sep 2 2023, 4:04 PM
Subscribers
None

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
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