From owner-freebsd-current@FreeBSD.ORG Sat Jul 8 21:56:48 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2A4B16A4DD; Sat, 8 Jul 2006 21:56:47 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 604A543D55; Sat, 8 Jul 2006 21:56:41 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1B58D51393; Sat, 8 Jul 2006 23:56:39 +0200 (CEST) Received: from localhost (dlr167.neoplus.adsl.tpnet.pl [83.24.47.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 97A2951394; Sat, 8 Jul 2006 23:56:32 +0200 (CEST) Date: Sat, 8 Jul 2006 23:53:21 +0200 From: Pawel Jakub Dawidek To: Scott Long Message-ID: <20060708215321.GJ16201@garage.freebsd.pl> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708161719.GB3871@crodrigues.org> <44B00011.9050902@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Swj79WlilW4BQYVz" Content-Disposition: inline In-Reply-To: <44B00011.9050902@samsco.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Craig Rodrigues , freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically 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: Sat, 08 Jul 2006 21:56:48 -0000 --Swj79WlilW4BQYVz Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 08, 2006 at 12:57:21PM -0600, Scott Long wrote: > Craig Rodrigues wrote: >=20 > >On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: > >>Linux has -t auto; haven't looked at how it works. > >I didn't want to implement -t auto, in > >case that would confuse things in case someone gets around > >to implementing autofs for FreeBSD, so I just used -t "". > >>It appears you just try a series of fs types; can't you read the device > >>to infer the filesystem? > >I was thinking of doing something like that. You can basically > >get the same info by doing something like: > >file - < /dev/ad0s1e > >/dev/stdin: Unix Fast File system (little-endian) > >file - < /dev/ad0s4 > >/dev/stdin: SGI XFS filesystem > >I leaned away from this approach in mount(8) because: > >- I didn't want to tie mount(8) to file(1) > >- I didn't want to build up a table of known superblocks > > inside mount(8) because every time a new filesystem is > > added to FreeBSD, mount(8) would need to be updated > >If there was a way, maybe at the GEOM or filesystem level to > >"taste" what type of filesystem existed on a device, and/or > >have a filesystem advertise what type of superblock it has, > >then that would be a nice way to do it, but I couldn't figure > >out a way to easily do it. >=20 > Well, by running through a list of possible filesystems and trying > each one, you are effectively 'tasting' them. In a brute force way, > but still the exact same idea. [...] One thing I don't like about this idea, is that simple mount(8) command will load all file system kernel modules if we give for example device with no file system on it. Currently I think there is no way to tell from userland mount(8) that because of our call, the kernel has loaded file system module. We could load it from mount(8) instead of waiting for the kernel to do it and then unload if we don't such such file system on the given device... > [...] But really, it's not like filesystems > are sprouting up every day, so I don't see the need to spend a lot of > time making this elegant and highly extensible. What Craig was trying to do over the last few weeks/months was to remove file systems specific code out of mount(8), so this will be a step backwards, I think... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Swj79WlilW4BQYVz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEsClRForvXbEpPzQRAoV3AKDmDsSBmqUrx3XTAaQVPvQFdmlcNACfXCbJ smXjBDifzfy6uvxbTc+12+E= =K68X -----END PGP SIGNATURE----- --Swj79WlilW4BQYVz--