Subject: Re: newfs: determining file system parameters
To: Bill Studenmund <wrstuden@netbsd.org>
From: Ted Unangst <tedu@zeitbombe.org>
List: tech-kern
Date: 10/18/2003 02:55:29
On Fri, 17 Oct 2003, Bill Studenmund wrote:

> > one possible concern is that this approach is very ffs-centric.
> 
> How so? i.e. who has this as a concern?

let me elaborate.  personally, i think fs parameters should be entirely 
separate from the partition.

> The purpose of the ioctl is so that newfs and all the other file system 
> generators don't have to bother with a disklabel. They just know they have 
> a partition, and get/set info about it.

there are only two pieces of information that i think matter at the 
partition level.  size and fs type.  size because it's an inherent 
property of the partition, independent of fs.  type because it saves the 
trouble of iterating around looking for magic numbers (and no false 
matches).

anything else belongs in the file system itself (superblock).  if a fs 
exists, the superblock is obviously the definitive record and the 
"outside" information doesn't matter.  if no fs exists yet, the fs 
generator should be able to guess/generate/ask for sane values.

you've convinced me you will need an ioctl to get/set all this extra info.  
you haven't convinced me this info should be stored outside the fs. :)
for the record, i don't think this info belongs in the disklabel either.  
i think a better location for it all would be something like /etc/fstab 
(/etc/partitions perhaps) if you think it's important.



-- 
we don't live
we just scratch on day to day
with nothing but matchbooks and sarcasm in our pockets