Page MenuHomeFreeBSD

ufs: a fix for sync write
AbandonedPublic

Authored by kib on Jun 23 2020, 4:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 8 2024, 7:37 PM
Unknown Object (File)
Feb 6 2024, 11:14 PM
Unknown Object (File)
Dec 20 2023, 7:50 AM
Unknown Object (File)
Dec 11 2023, 2:18 AM
Unknown Object (File)
Oct 10 2023, 8:49 PM
Unknown Object (File)
Sep 17 2023, 12:22 PM
Unknown Object (File)
Sep 6 2023, 9:50 AM
Unknown Object (File)
Sep 1 2023, 9:53 PM
Subscribers

Details

Reviewers
mckusick
Summary

If doing sync write, we should update the inode block not only when the inode size increased, but also in case the hole was filled that caused allocation of the direct blocks.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 31885

Event Timeline

kib requested review of this revision.Jun 23 2020, 4:13 AM

I believe that the existing test already has this covered. The test (resid > uio->uio_resid) is checking that any data has been written. In the typical case this is at the end of the file and the size will have increased. But if the write was in the middle of a file filling in a hole then this test will catch that and cause the inode to be written.

Agreed, sorry for the noise.