kernel - Fix bug when running swapon a gpt slice
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 11 Oct 2013 19:44:03 +0000 (12:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 11 Oct 2013 19:44:03 +0000 (12:44 -0700)
commit54cf95586e9d23ffaaa0b664daf4099f129fa1a8
tree0578e448280604f760302b94db339cb9c0e15ce3
parentb7ebebd18bb9366e6938415e2030c9ee7fdff081
kernel - Fix bug when running swapon a gpt slice

* diskpsize() and related API functions to obtain the number of blocks
  in a disk specification was punting if there was no dragonfly disklabel.
  This path was being specifically used by swapon.

* Do not require a dragonfly disklabel when the whole-slice partition is
  specified (i.e. /dev/daXsY with no a...z suffix).

* Swapon now works on gpt swap slices.

Reported-by: julianp
sys/kern/subr_diskslice.c