vn - Major overhaul
authorAlex Hornung <ahornung@gmail.com>
Fri, 19 Nov 2010 09:18:18 +0000 (09:18 +0000)
committerAlex Hornung <ahornung@gmail.com>
Fri, 19 Nov 2010 15:05:44 +0000 (15:05 +0000)
commit1398353708029eb9dda9861e12c2efb4e66e8122
tree5ff462e5cafb55207c978250cc7aa7df104717af
parent8d51c2a2ca038bac418326ce11c941775a71f600
vn - Major overhaul

* Now that we can do proper disk cloning we do so. vn_create will now
  return the top device of the disk (the one that belongs to the disk
  subsystem and not us) if asked to do so. This is then passed back from
  the clone handler so that we have a real cloned disk.

* Remove all sorts of old hacks, mostly related to finding vn's and
  strange cdev lists that were not being used anymore anyways.

* Avoid the destruction/detachment of devices that are in use by keeping
  track of whether they are open or not and checking the opencount
  provided by the disk susbsystem.

* Fix a memory leak related to adding references to devs but never
  releasing them.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1561 (partly)
sys/dev/disk/vn/vn.c