xdisk - disk_setdiskinfo() must be assynchronous
commitd34b92aff64e5c0f283d9da3a2aa6803b08bd5a2
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Feb 2015 07:28:42 +0000 (27 23:28 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Feb 2015 07:29:48 +0000 (27 23:29 -0800)
treec0471375649a444af6c29d9d668cc1712b87fb8f
parent1e271b664a4b7cfa1a7d41bef5b2018b2e842d0a
xdisk - disk_setdiskinfo() must be assynchronous

* Allow CMD_BUF_READ operations without the device having to be open.
  This allows disk probes to occur.

* Use disk_setdiskinfo(), which is asynchronous, to avoid an I/O deadlock
  because the call is made from the rxmsg loop.  If it were to issue I/O
  synchronously we would deadlock and never process the reply.
sys/dev/disk/xdisk/xdisk.c
sys/kern/subr_diskiocom.c