hammer2 - Fix DIO_INPROG race.
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 1 Mar 2015 19:46:12 +0000 (11:46 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 1 Mar 2015 19:46:12 +0000 (11:46 -0800)
commit9f7262b510923c1aecd40717e14c57d737e94535
tree5007ffd698da47479183e86dfa6e6254e2c9337d
parentbab1d4ff0c072f65ad634c49ace4f4201e7eb90c
hammer2 - Fix DIO_INPROG race.

* It is possible when a chained DIO_INPROG is present for the DIO to become
  GOOD and for the dio->refs ref to be release, but not yet have finished
  its INPROG processing due to the chaining.

  In this situation, a temporary user of the DIO will get/put it and hit
  an important sanity assertion in putblk.

* Fix by disallowing the DIO_GOOD shortcut in hammer2_io_getblk() if the
  DIO is still DIO_INPROG.
sys/vfs/hammer2/hammer2_io.c