From owner-freebsd-arch@FreeBSD.ORG Mon Jul 10 20:22:42 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 3AC8716A4DF; Mon, 10 Jul 2006 20:22:42 +0000 (UTC) (envelope-from SRS0+82d3cd74a67493595751+1051+infradead.org+hch@pentafluge.srs.infradead.org) Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D76C43D49; Mon, 10 Jul 2006 20:22:40 +0000 (GMT) (envelope-from SRS0+82d3cd74a67493595751+1051+infradead.org+hch@pentafluge.srs.infradead.org) Received: from hch by pentafluge.infradead.org with local (Exim 4.62 #1 (Red Hat Linux)) id 1G02Gp-0007pl-5f; Mon, 10 Jul 2006 21:22:19 +0100 Date: Mon, 10 Jul 2006 21:22:19 +0100 From: Christoph Hellwig To: Scott Long Message-ID: <20060710202219.GA29786@infradead.org> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> <20060708174606.GA29602@infradead.org> <44B2A51A.4040103@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44B2A51A.4040103@samsco.org> User-Agent: Mutt/1.4.2.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Cc: freebsd-arch@freebsd.org, freebsd-current@freebsd.org, Craig Rodrigues 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: Mon, 10 Jul 2006 20:22:42 -0000 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.