cvs commit: src/etc MAKEDEV src/lib/libc/gen disklabel.c src/sbin/disklabel disklabel.c src/sys/dev/disk/ata atapi-tape.c src/sys/dev/disk/fd fd.c src/sys/kern subr_disk.c subr_diskslice.c vfs_conf.c src/sys/sys disk.h disklabel.h diskslice.h

Matthew Dillon dillon at crater.dragonflybsd.org
Fri May 18 17:53:12 PDT 2007


dillon      2007/05/18 17:52:03 PDT

DragonFly src repository

  Modified files:
    etc                  MAKEDEV 
    lib/libc/gen         disklabel.c 
    sbin/disklabel       disklabel.c 
    sys/dev/disk/ata     atapi-tape.c 
    sys/dev/disk/fd      fd.c 
    sys/kern             subr_disk.c subr_diskslice.c vfs_conf.c 
    sys/sys              disk.h disklabel.h diskslice.h 
  Log:
  Continue untangling the disklabel.
  
  * Move dk*() inline functions and other related stuff not directly related
    to the BSD disklabel out of sys/disklabel.h and into sys/diskslice.h.
    Add additional functions to sys/diskslice.h
  
  * Extend the slice and partition fields in the device minor number.  We
    now support up to 128 slices and up to 256 partitions.
  
  * Implement new minor device numbers for 'raw slices', such as ad0s1.
    Previously raw slices used the same minor number as partition c within
    the slice.  e.g. ad0s1 and ad0s1c had the same device number.
    This made it impossible to distinguish between the two.
  
    The 'whole disk' device's minor number has also changed.  Our new whole-slice
    and whole-disk devices specify a partition number of (DKMAXPARTITIONS - 1)
    (aka 255).
  
  * Completely disable disklabel related operations on the raw disk, e.g.
    da0, and on partitions, e.g. da0s1a.  Only allow disklabel
    operations on whole slices, e.g. da0s1.
  
    NOTE!! For compatibility while booting drivers which set DSO_COMPATLABEL,
    the compat disklabel may be read, but not written, via the whole-disk
    device.  e.g. acd0.
  
    NOTE!! For compatibility we have no choice but to continue to snoop
    read/write operations on raw slices (e.g. da0s1) because the
    disklabel program and the kernel still depend on the snooping to modify
    the in-core version of the disklabel to the on-disk version.
  
    No snooping will occur on the whole-disk device (e.g. da0).
  
    No snooping will occur on raw slices (e.g. da0s1) if the disk is
    unlabeled and no in-core label was set.  Note that disklabel -r -w
    DOES set an in-core label before writing to a raw-slice, so it is still
    ok.
  
  * dsopen() no longer attempts to scan the MBR or slice table when the
    whole-disk device (e.g. da0) is opened, and no longer attempts to read
    the disklabel when the whole-slice device is opened (e.g. da0s1).  The
    disklabel is only read when a partition is explicitly opened or the
    label is explicitly read via an ioctl.
  
  * The virgin disklabel is stored in the struct diskslice for
    WHOLE_DISK_SLICE (slice 1).
  
  Revision  Changes    Path
  1.28      +78 -54    src/etc/MAKEDEV
  1.11      +0 -5      src/lib/libc/gen/disklabel.c
  1.16      +3 -2      src/sbin/disklabel/disklabel.c
  1.21      +1 -1      src/sys/dev/disk/ata/atapi-tape.c
  1.38      +1 -0      src/sys/dev/disk/fd/fd.c
  1.32      +4 -5      src/sys/kern/subr_disk.c
  1.35      +235 -99   src/sys/kern/subr_diskslice.c
  1.30      +1 -1      src/sys/kern/vfs_conf.c
  1.15      +3 -1      src/sys/sys/disk.h
  1.23      +2 -113    src/sys/sys/disklabel.h
  1.13      +204 -6    src/sys/sys/diskslice.h


http://www.dragonflybsd.org/cvsweb/src/etc/MAKEDEV.diff?r1=1.27&r2=1.28&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libc/gen/disklabel.c.diff?r1=1.10&r2=1.11&f=u
http://www.dragonflybsd.org/cvsweb/src/sbin/disklabel/disklabel.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/ata/atapi-tape.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/fd/fd.c.diff?r1=1.37&r2=1.38&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/subr_disk.c.diff?r1=1.31&r2=1.32&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/subr_diskslice.c.diff?r1=1.34&r2=1.35&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_conf.c.diff?r1=1.29&r2=1.30&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/disk.h.diff?r1=1.14&r2=1.15&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/disklabel.h.diff?r1=1.22&r2=1.23&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/diskslice.h.diff?r1=1.12&r2=1.13&f=u





More information about the Commits mailing list