sys/dev/disk/dm: Add 2nd level bio_done handler for striped target
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 4 Nov 2015 13:03:05 +0000 (22:03 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 6 Nov 2015 14:42:24 +0000 (23:42 +0900)
commit20f001c961dc227470db7ef792a56dec76443f66
treeb84a5afbf366dce625237aed69f6bfa76c526a67
parent9bbca0fb9342fee86ae9d98e25592db1fa422884
sys/dev/disk/dm: Add 2nd level bio_done handler for striped target

As mentioned in b48c316c, dm-striped target needs to have its
own callback in order to make use of error counter. It could
be done by either modifying netiobuf code or using stacked bio,
but using stacked bio seems to be the right approach here as
it doesn't modify the existing netiobuf bio code.

This commit adds bio_done handler for nbio (the 2nd level bio
after pushing the original bio), and make the handler increment
num_error field of a stripe device if i/o error is detected.
sys/dev/disk/dm/targets/striped/dm_target_striped.c