avg 2065fb7f87 vfs_donmount: in certain cases try r/o mount if r/w mount fails
If the operation is not an update, if neither r/w nor r/o mode is
explicitly requested, if the error code hints at the possibility of the
media being read-only, and if the fallback is allowed, then we can try
to automatically downgrade to the readonly mode.

This is especially useful for auto-mounting of removable media that
sometimes can happen to be write-protected.

The fallback to r/o is not enabled by default.  It can be requested on a
per-mount basis with a new mount option, 'autoro'.  Or it can be
globally allowed by setting vfs.default_autoro.

Reviewed by:	cem, kib
MFC after:	3 weeks
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D13361
2018-03-27 14:31:42 +00:00
..
2018-03-20 17:58:51 +00:00
2018-03-23 15:50:01 +00:00
2018-03-26 23:54:59 +00:00
2018-03-27 06:33:00 +00:00
2018-03-24 21:30:24 +00:00
2018-03-17 12:59:55 +00:00
2018-02-14 00:12:03 +00:00
2018-03-27 06:33:00 +00:00
2018-03-23 16:56:44 +00:00
2018-02-08 20:09:42 +00:00
2018-03-20 17:58:51 +00:00
2018-03-24 21:30:24 +00:00
2018-03-17 12:59:55 +00:00