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

Konstantin Belousov kostikbel at gmail.com
Thu May 17 11:42:47 UTC 2018


On Thu, May 17, 2018 at 10:04:01AM +0200, Stefan Esser wrote:
> In case that a media (whether removable or not) was mounted R/W and not
> written to (had no dirty buffers) for more than a few seconds, the mount
> could be downgraded to R/O (in the same way as by a "mount -u -o ro"). A
> flag that recorded the fact, that this partition may be written to could
> then be checked in the "write to R/O partition" error case, and if the
> file system was only temporarily set to R/O, it could be treated like a
> first access to a writable partition (i.e., write a dirty flag into the
> super-block or whatever action the file system performs when mounted R/W).
> 
> In short, the suggestion is to down-grade the mount state of any file-system
> not used for some configurable time to R/O, with an automatic upgrade to R/W
> on the next write attempt.
Downgrade to ro revokes all file descriptors opened for write, otherwise
it is not a downgrade.

This would be a huge mess.


More information about the freebsd-fs mailing list