Keep the ds_skip_* fields in struct diskslice properly synchronized.
ds_skip_bsdlabel is inclusive of bsd_skip_platform but was being improperly
set to 0 even when an mbr reserved sector existed. The fields were not
being properly reset for a slice whos disklabel is destroyed.
Defer reading the disklabel on a slice until a partition on the slice
is opened or a disklabel related DIOC ioctl is performed on the slice.
In particular, we do not attempt to read the disklabel when opening the
whole-disk-slice for the whole disk or the whole-slice-partition for a slice.
Previously the code attempted to scan all available BSD slices for
disklabels.
When writing to a raw slice, do not snoop or do reserved-sector checks
unless a disklabel has been loaded for the slice. Typically a disklabel
will only be loaded in two situations: (1) if filesystems are mounted from
that slice or (2) the disklabel program has performed ioctls on the
whole-slice-partition to set a disklabel. Now writing to raw slices works
almost the same as writing to the whole-disk-slice, with no interpretation.
Remove all remaining references to the LABELSECTOR constant. Instead,
use the ds_skip_* fields to determine the sector where the disklabel
starts within a slice. These changes significantly cleaned up the
snoop and reserved sector checking code in dscheck().