[Bug 210316] panic after trying to r/w mount msdosfs on write protected media

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu May 17 16:29:14 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210316

--- Comment #16 from Warner Losh <imp at FreeBSD.org> ---
(In reply to Andriy Gapon from comment #14)
    bp = getblk(...)
    bp->b_flags |= B_INVAL | B_RELBUF | B_NOCACHE;
    bp->b_flags &= ~(B_ASYNC | B_CACHE);
    brelse(bp);

maybe we need a bfinval(bp) that does that. "Forced" is the 'f' but I'm open to
any other name. Basically "Throw away this buffer I know is dirty." We have a
'flush' operation but no 'invalidate' or 'throw away' operation for these cache
entries. If we centralize it, we'll have fewer gross hacks like this in the
system that "should work" but gradually drift away from working because of some
subtle change in what B_NOCACHE means 5 years from now...

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list