kernel - Fix panic when the ccd device is used with swapcache
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 Jul 2011 03:37:54 +0000 (20:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 Jul 2011 03:37:54 +0000 (20:37 -0700)
commit1384d50bccd94972e3cd368c8287372bfbaae02c
tree39929a2024e75f5dca38c029692cc2810fdb6c71
parent28a9a7b64edd9f44bfa71de86e27d0b1ace01d37
kernel - Fix panic when the ccd device is used with swapcache

* The CCD device does not populate bp->b_xio.xio_npages or xio_pages[].
  A quirk in the xio test in vn_cache_strategy() could result in a null
  pointer dereference panic.

* Fix the test to avoid the panic.  Note that swapcache does not currently
  work well with the CCD device for stripe-crossing I/Os due to the way
  CCD breaks the I/O up.  It should no longer panic, though.
sys/kern/vfs_bio.c