Re: panic when mounting device >= 2 times

From: Andriy Gapon <avg_at_icyb.net.ua>
Date: Wed, 14 Oct 2009 14:58:56 +0300
on 14/10/2009 14:21 Alexander Best said the following:
> could somebody have a look at this PR please:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/108968
> 
> this still exists in -CURRENT.

This is because of serious and long-standing brokenness (probably from time of
introduction of GEOM) in g_vfs_open/g_vfs_close.
The essence:
1. we allow multiple concurrent read-only mounts of a device
2. but even a read-only mount mangles bufobj of device vnode
3. Bug!
Trivial fix with POLA violation - prohibit concurrent RO mounts.
Non-trivial fix - _somehow_ avoid changing or depending on device vnode bufobj.

See this for even more evil example of this problem:
http://lists.freebsd.org/pipermail/freebsd-fs/2009-February/005676.html

-- 
Andriy Gapon
Received on Wed Oct 14 2009 - 09:59:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:56 UTC