Date: Fri, 2 May 2003 08:36:28 -0700 From: David Schultz <das@FreeBSD.ORG> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: msdosfs vs 250Gb hard disk Message-ID: <20030502153628.GA47629@HAL9000.homeunix.com> In-Reply-To: <200305021616.37560.doconnor@gsoft.com.au> References: <1093.128.39.153.23.1051365009.squirrel@cain.gsoft.com.au> <20030502112413.GA46200@HAL9000.homeunix.com> <200305021616.37560.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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. :-(
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030502153628.GA47629>