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
F147922483: D30555.diff
Sat, Mar 14, 4:44 PM
Unknown Object (File)
Jan 27 2026, 10:55 AM
Unknown Object (File)
Jan 25 2026, 1:01 AM
Unknown Object (File)
Jan 17 2026, 5:18 AM
Unknown Object (File)
Jan 10 2026, 11:38 AM
Unknown Object (File)
Dec 12 2025, 4:45 PM
Unknown Object (File)
Dec 10 2025, 8:18 AM
Unknown Object (File)
Nov 20 2025, 2:40 AM
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.