Date: Wed, 14 Oct 2009 22:46:57 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Andriy Gapon <avg@icyb.net.ua> Cc: Alexander Best <alexbestms@math.uni-muenster.de>, freebsd-current@FreeBSD.org Subject: Re: panic when mounting device >= 2 times Message-ID: <20091014204657.GB1727@garage.freebsd.pl> In-Reply-To: <4AD5BD00.4050700@icyb.net.ua> References: <permail-2009101411215080e26a0b00001bea-a_best01@message-id.uni-muenster.de> <4AD5BD00.4050700@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Wed, Oct 14, 2009 at 02:58:56PM +0300, Andriy Gapon wrote: > 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. I've this patch that is suppose to fix it: http://people.freebsd.org/~pjd/patches/geom_vfs.c.patch But AFAIR its not complete. I think it is still possible to remount one of the read-only mounts to read-write. Another possibility that comes to my mind is to keep list/array of consumers in bo_private instead of using one consumer only. This would be better in terms of access management. -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFK1jjBForvXbEpPzQRAit3AJ4y3sElFfuPMggRCMGKLgsWKZbt4ACbB6ZJ oI3aIbx6SYuHNjP3Nq1wLKI= =925B -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091014204657.GB1727>
