提交 df699cc1 编写于 作者: M Mikulas Patocka 提交者: Mike Snitzer

dm writecache: report invalid return from writecache_map helpers

If some "writecache_map_*" function returns invalid state, it is a bug.
So, we should report it and not fail silently.
Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 15cb6f39
...@@ -1545,10 +1545,13 @@ static int writecache_map(struct dm_target *ti, struct bio *bio) ...@@ -1545,10 +1545,13 @@ static int writecache_map(struct dm_target *ti, struct bio *bio)
return DM_MAPIO_SUBMITTED; return DM_MAPIO_SUBMITTED;
case WC_MAP_ERROR: case WC_MAP_ERROR:
default:
wc_unlock(wc); wc_unlock(wc);
bio_io_error(bio); bio_io_error(bio);
return DM_MAPIO_SUBMITTED; return DM_MAPIO_SUBMITTED;
default:
BUG();
return -1;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册