Page MenuHomeFreeBSD

ufs: a fix for sync write
AbandonedPublic

Authored by kib on Jun 23 2020, 4:13 AM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 31885

Event Timeline

kib created this revision.Jun 23 2020, 4:13 AM
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.

kib abandoned this revision.Jun 24 2020, 6:29 AM

Agreed, sorry for the noise.