DEVFS - Fix asynchronous race on reprobe, remove devfs_msg id, cleanup
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 7 Aug 2009 17:39:24 +0000 (10:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 7 Aug 2009 17:39:24 +0000 (10:39 -0700)
commitd0fe8596b748b6801c6c0c469b1b5f7613a7f39d
treeaaed8dc25197df3464bf8d50c5abb95cf2f7168b
parent7f6220a9966bf104115eb413930aea5f901bedc8
DEVFS - Fix asynchronous race on reprobe, remove devfs_msg id, cleanup

* The synchronous DISK_DISK_REPROBE and DISK_SLICE_REPROBE messages
  return while make_dev devices are still queued to devfs.  Add
  a call to devfs_config() to wait for the creation of those devices
  to finish before returning.

  This fixes numerous problems with shell scripts which fdisk + disklabel +
  newfs in a batch.

* Remove devfs_msg->id, also fixing an issue where the id was retrieves
  after the message is freed.  Async entry points now return void instead
  of the id.

* Adjust devfs_msg_send() to execute the message directly if the calling
  thread is the devfs message thread.  This is not strictly needed right
  now but may be used in the future.

* General cleanup.
sys/kern/subr_diskslice.c
sys/kern/vfs_conf.c
sys/vfs/devfs/devfs.h
sys/vfs/devfs/devfs_core.c