[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 06:00:34 UTC 2018


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

--- Comment #15 from Andriy Gapon <avg at FreeBSD.org> ---
(In reply to Konstantin Belousov from comment #9)

This proposal looks like something that can help with the problem at hand in a
generic way.
I see that at present g_vfs_close() does not even check the return code of
bufobj_invalbuf().  That looks dangerous?  But not sure if the code can do
better.  E.g., if looping on an error would be okay.

Then, there remains a question of when to use the proposed g_vfs_close(NOSAVE).
There are obvious cases like a failed mount.
And that's what we want to address now, so that's good.

But there can be a more complex situation.
For example, we can mount a filesystem r/w and do some writes to it.
But then the hardware suddenly decides to go to read-only mode (e.g., because
some internal counter crosses its threshold).
So, we will get some failed writes and some dirty buffers that cannot possibly
be made clean by writing out.
Do we need to somehow handle them?
And then we decide to unmount the filesystem.
How do we handle those buffers?
How do we know if we should call g_vfs_close(SAVE) or g_vfs_close(NOSAVE) ?

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


More information about the freebsd-fs mailing list