From owner-freebsd-stable@FreeBSD.ORG Fri May 2 08:36:37 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24E1137B401 for ; Fri, 2 May 2003 08:36:37 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5012B43FCB for ; Fri, 2 May 2003 08:36:32 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.5) with ESMTP id h42FaTuU047791; Fri, 2 May 2003 08:36:29 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.5/Submit) id h42FaSJF047790; Fri, 2 May 2003 08:36:28 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 2 May 2003 08:36:28 -0700 From: David Schultz To: "Daniel O'Connor" Message-ID: <20030502153628.GA47629@HAL9000.homeunix.com> Mail-Followup-To: Daniel O'Connor , freebsd-stable@FreeBSD.ORG References: <1093.128.39.153.23.1051365009.squirrel@cain.gsoft.com.au> <20030502112413.GA46200@HAL9000.homeunix.com> <200305021616.37560.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200305021616.37560.doconnor@gsoft.com.au> cc: freebsd-stable@FreeBSD.ORG Subject: Re: msdosfs vs 250Gb hard disk X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2003 15:36:37 -0000 On Fri, May 02, 2003, Daniel O'Connor wrote: > On Fri, 2 May 2003 13:24, David Schultz wrote: > > Most filesystems have a unique identifier associated with every > > file, but msdosfs does not. The FreeBSD driver invents inumbers > > on the fly as the index of the directory entry for the file, > > assuming that the entire disk is full of directory entries. These > > numbers are 32 bits and they need to be persistent, so it would > > not be possible to play any clever tricks with the math. > > I don't think FAT32 can have 4 billion files..? I understand your point about > the limitations of the inode number synthesiser, but I was hoping someone > with more knowledge of how FAT works to be able to give some hints :) :) The problem is that virtually any sector on the disk can be used for directory entries. You can't have the inumbers for existing files changing every time you create a new file, and you can't have two files with the same inumber. There are insufficient unused fields in the DOS directory entry to record the persistent state you would need to somehow allocate inode numbers in an intelligent way, so you're kinda stuck unless you (for instance) invent a special file to keep track of the information, and write to it all the time. The short of it is that it's a hard problem to solve. FreeBSD's msdosfs implementation mainly exists for compatability; it isn't supposed to be amazingly robust, and no implementation of msdosfs can be. So basically, you're stuck with sub-128GB drives if you want to use FAT32. :-(