Subject: Re: Filesystems vs. device sector sizes
To: Bill Stouder-Studenmund <wrstuden@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 07/26/2007 07:57:04
On Wed, Jul 25, 2007 at 10:46:25PM -0700, Bill Stouder-Studenmund wrote:
> 
> Kinda, and that part works fine. The deal is that cd9660 was written on 
> systems with DEV_BSIZE == 512. So the CD drivers and the file system have 
> all been developed to work together. I _think_ they are consistent with 
> what we're talking about, but it's not necessarily true. After all using 
> cd9660 on a CD drive is using a file system designed for 2k sectors on a 
> device with 2k sectors. A real test would be to see if you could dd an iso 
> to a hard disk (512b sectors), point cd9660 at it, and have it all just 
> work.

I THINK the above works.

My thoughts are that, ideally, if you copy a disk image from 2k sector
media to 512byte sector media then the whole thing should still work. [1]
Now maybe some partitioning schemes have to have 'sector' numbers in them,
but the filesystem data should be physical sector size agnostic.

One example is that the netbsd disklabel (on i386) has to reside
at bytes 512-1023 of the partition, not in the second sector.

	David

[1] The other way around may not work due to alignment issues.

-- 
David Laight: david@l8s.co.uk