From owner-freebsd-arch@FreeBSD.ORG Tue Jul 11 20:09:57 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A30316A4DD; Tue, 11 Jul 2006 20:09:57 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AF8243D70; Tue, 11 Jul 2006 20:09:55 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.1/8.13.3) with ESMTP id k6BK9pWU042699; Tue, 11 Jul 2006 13:09:51 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.1/8.13.3/Submit) id k6BK9oXu042698; Tue, 11 Jul 2006 13:09:50 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Tue, 11 Jul 2006 13:09:49 -0700 From: Greg Lewis To: Christoph Hellwig Message-ID: <20060711200949.GA42576@misty.eyesbeyond.com> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708174606.GA29602@infradead.org> <44B2A51A.4040103@samsco.org> <20060710202219.GA29786@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060710202219.GA29786@infradead.org> User-Agent: Mutt/1.4.2.1i Cc: Craig Rodrigues , Scott Long , freebsd-current@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 20:09:57 -0000 On Mon, Jul 10, 2006 at 09:22:19PM +0100, Christoph Hellwig wrote: > On Mon, Jul 10, 2006 at 01:06:02PM -0600, Scott Long wrote: > > So in your opinion and experience, what are the pros and cons of > > maintaining a table of magic numbers? > > The feature is imensely useful. The implementation won't win any > points for a clean design but works very well in practice. I think > it's definitly better than probing in the kernel because letting a filesystem > driver try to make sense of something that's not it's own format can > lead to all kinds of funnies. Linux does this (iterating all filesystem > types in kernel) for the special case of the root filesystem where mount(8) > is not available, and it showeds various interesting bugs at least in the > fat driver. It also (the root filesystem special case) has a tendency to give misleading error messages which cost me a number of lost hours and grey hairs in my previous job. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org