Page MenuHomeFreeBSD

vinvalbuf: do not panic if we were unable to flush dirty buffers
ClosedPublic

Authored by kib on May 30 2021, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 8:55 PM
Unknown Object (File)
Oct 5 2024, 12:44 PM
Unknown Object (File)
Oct 5 2024, 12:44 PM
Unknown Object (File)
Oct 5 2024, 12:44 PM
Unknown Object (File)
Oct 5 2024, 12:22 PM
Unknown Object (File)
Oct 4 2024, 7:35 AM
Unknown Object (File)
Oct 2 2024, 3:51 AM
Unknown Object (File)
Oct 1 2024, 10:24 PM
Subscribers

Details

Summary

Return EBUSY instead and let caller to handle the issue.

For vgone()/vnode reclamation, caller first does vinvalbuf(V_SAVE), which return EBUSY in case dirty buffers where not flushed. Then caller calls vinvalbuf(0) due to non-zero return, which gets rid of all dirty buffers without dependencies.

PR: 238565

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.May 30 2021, 5:13 PM
kib created this revision.

Works for me. You should also reenable the test in tests/sys/fs/fusefs/write.cc.

This revision is now accepted and ready to land.May 30 2021, 6:35 PM

You should also reenable the test in tests/sys/fs/fusefs/write.cc.

Please do it yourself after my change.