From owner-freebsd-current@FreeBSD.ORG Sun Aug 22 11:05:40 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3357210656A7; Sun, 22 Aug 2010 11:05:40 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id CAD8E8FC16; Sun, 22 Aug 2010 11:05:39 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 2AC5F45E86; Wed, 18 Aug 2010 14:15:56 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 1AC1945CAC; Wed, 18 Aug 2010 14:15:51 +0200 (CEST) Date: Wed, 18 Aug 2010 14:15:50 +0200 From: Pawel Jakub Dawidek To: Ed Schouten Message-ID: <20100818121550.GD2177@garage.freebsd.pl> References: <4C6B9F51.1060009@freebsd.org> <20100818104853.GB2978@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Km1U/tdNT/EmXiR1" Content-Disposition: inline In-Reply-To: <20100818104853.GB2978@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org, Daichi GOTO , freebsd-current@freebsd.org Subject: Re: Mounting cd9660 multiple times gives EBUSY [Was: unionfs a little improvement] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 11:05:40 -0000 --Km1U/tdNT/EmXiR1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 18, 2010 at 12:48:53PM +0200, Ed Schouten wrote: > Hi Daichi, >=20 > 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. ;-) >=20 > 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): >=20 > 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 >=20 > 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: What you are trying to do here is to mount /dev/iso9660/freebsd for the second time? This is not supported. The check is there to prevent doing this, as it will panic on you when you try to unmount first mount (not really a problem in your case, as the first mount is /, so you probably don't want to unmount it, but it is a problem in general). You should be able to reproduce the panic with your patch applied by doing the following: # mount -t cd9660 /dev/iso9660/freebsd /mnt0 # mount -t cd9660 /dev/iso9660/freebsd /mnt1 # umount /mnt0 --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Km1U/tdNT/EmXiR1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkxrzvUACgkQForvXbEpPzRytgCgo8Cm2ShBhf8i+rFg9nvOiNn8 bMoAn2J+eG3iColgrWmofQQlfPP4OIvW =GD6x -----END PGP SIGNATURE----- --Km1U/tdNT/EmXiR1--