subr_disk - 'official' support for cloning; cleanup
authorAlex Hornung <ahornung@gmail.com>
Fri, 19 Nov 2010 09:15:30 +0000 (09:15 +0000)
committerAlex Hornung <ahornung@gmail.com>
Fri, 19 Nov 2010 14:53:32 +0000 (14:53 +0000)
commit4064300e05e10d6af2b73f352f48e9534b1bd50d
treed0ee992028bb11fc911701ec3bbb6c7bbe56f8cd
parentcc754c81dff8dc0234cc177aefeac3af8b117c8f
subr_disk - 'official' support for cloning; cleanup

* Add 'official' cloning support, so that the top level node is also
  make_only_dev'd in the case of a cloned disk creation. This way
  the top level node can be used as a return value for the clone
  handler.

* Right now we are basically returning the raw underlying device node
  when we clone in vn. This can now be changed to actually do things
  properly so that everything passes through the disk subsystem.

* Clean up some dead code mostly related to the old understanding of
  'cloning', which has nothing to do with what's going on nowadays.

* Fix a leak of cdevs. The underlying 'rawdev' was never being released,
  resulting in a leak of these each time a disk was destroyed.
sys/kern/subr_disk.c
sys/sys/disk.h