In message <[EMAIL PROTECTED]>, walt writes:

>#disklabel -r ad2s2
>#        size   offset    fstype   [fsize bsize bps/cpg]
>   a: 17207240  7773835    4.2BSD        0     0     0         # (Cyl.  483*- 1554*)

>#disklabel ad2s2
>#        size   offset    fstype   [fsize bsize bps/cpg]
>   a: 17207240   400000    4.2BSD        0     0     0         # (Cyl.   24*- 1095*)

>This behavior is new with GEOM, as is the warning about c not covering the
>whole unit.  The kernel without GEOM offers no complaints about the same label.

This is because the old code would lie to you if you tried to read the
disklabel directly off the media instead of using the ioctl() calls.

I feel it is fundamentally wrong to modify data in-band this way
without telling the user.  Therefore I have not implemented it in GEOM.

For reasons I have never fully accepted, the BSD disklabel is written
to represent the entire physical disk so the ondisk information does
not actually list partition 'c' as starting on sector zero, rather
it lists the physical sector number (which corresponds to the start
sector of that slice).

The way GEOM deals with BSD labels, it will try to identify such
a "magic" offset and correctly DTRT, but it will also accept
un-offset ondisk disklabels, which I hope we can migrate to now.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to