Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2010 12:48:53 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Daichi GOTO <daichi@freebsd.org>
Cc:        freebsd-fs@freebsd.org, freebsd-current@freebsd.org
Subject:   Mounting cd9660 multiple times gives EBUSY [Was: unionfs a little improvement]
Message-ID:  <20100818104853.GB2978@hoeg.nl>
In-Reply-To: <4C6B9F51.1060009@freebsd.org>
References:  <4C6B9F51.1060009@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi Daichi,

I think Keith Packard of Xorg once wrote a commit message along the
lines of "5000 lines of code removed, feature added" This seems to be
similar, albeit on a smaller scale. ;-)

Apart from this issue with unionfs, I am also experiencing another
issue, where for some reason I cannot perform a second mount of the CD
right after booting the system. Basically, my WIP FreeBSD boot CD does
the following (but written in C):

	mount -t cd9660 /dev/iso9660/freebsd /mnt
	mount -t tmpfs none /tmp
	mount -t unionfs /tmp /mnt
	mount -t devfs none /mnt/dev
	chroot /mnt /sbin/init

The first step fails with EBUSY. I use the following hack to get it
working, but I don't think it's the proper way to solve it:

%%%
Index: sys/geom/geom_vfs.c
===================================================================
--- sys/geom/geom_vfs.c	(revision 211093)
+++ sys/geom/geom_vfs.c	(working copy)
@@ -162,8 +162,10 @@
 
 	*cpp = NULL;
 	bo = &vp->v_bufobj;
+#if 0
 	if (bo->bo_private != vp)
 		return (EBUSY);
+#endif
 
 	pp = g_dev_getprovider(vp->v_rdev);
 	if (pp == NULL)
%%%

I am really not that familiar with GEOM/VFS to understand the impact of
this change. What does it actually mean if bo->bo_private != vp?

-- 
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAkxrupUACgkQ52SDGA2eCwVOWgCfRlwSVs8Fs3iGD2ekr/cwQmMB
Y18An1UvOsrA+Xsys2nbvClJh8SoayaR
=nCoj
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100818104853.GB2978>