kernel - Add breadcb() function - async I/O w/completion callback
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 10 Apr 2011 15:43:12 +0000 (08:43 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 10 Apr 2011 15:43:12 +0000 (08:43 -0700)
commitc1c3e862be0312d5a93d8fe2fea22f0d7d6bab7f
tree9eda9465e8b68ba6995f79e2ab43cd5721178269
parent3242c748ea74256b58d8ef0f7a7783b8473847c3
kernel - Add breadcb() function - async I/O w/completion callback

* Add breadcb().  This function performs an asynchronous read for the
  requested buffer and issues the specified callback on completion.
  If the buffer is already B_CACHE the callback is made synchronously
  and BIO_DONE is pre-set on the bio so the callback function can
  determine if I/O occured or not (and whether it must bpdone() the buf).

* This function works differently from and is more flexible than the
  previously removed breada(), and will be used by HAMMER.
sys/kern/vfs_bio.c
sys/sys/buf.h