diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-09-10 23:27:42 +0200 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 06:56:43 +0100 |
commit | 5ceaaad7047745c1c02150c39d3fb623b7948d48 (patch) | |
tree | c03201ceda61314a0ec4b521e5d2d4d89bb1f0c2 /drivers/md/bcache/debug.c | |
parent | bcache: Delete some slower inline asm (diff) | |
download | linux-5ceaaad7047745c1c02150c39d3fb623b7948d48.tar.xz linux-5ceaaad7047745c1c02150c39d3fb623b7948d48.zip |
bcache: Bypass torture test
More testing ftw! Also, now verify mode doesn't break if you read dirty
data.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/debug.c')
-rw-r--r-- | drivers/md/bcache/debug.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index e99e6b8852b2..264fcfbd6290 100644 --- a/drivers/md/bcache/debug.c +++ b/drivers/md/bcache/debug.c @@ -189,13 +189,14 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio) void *p1 = kmap_atomic(bv->bv_page); void *p2 = page_address(check->bi_io_vec[i].bv_page); - if (memcmp(p1 + bv->bv_offset, - p2 + bv->bv_offset, - bv->bv_len)) - printk(KERN_ERR - "bcache (%s): verify failed at sector %llu\n", - bdevname(dc->bdev, name), - (uint64_t) bio->bi_sector); + cache_set_err_on(memcmp(p1 + bv->bv_offset, + p2 + bv->bv_offset, + bv->bv_len), + dc->disk.c, + "verify failed at dev %s sector %llu", + bdevname(dc->bdev, name), + (uint64_t) bio->bi_sector); + kunmap_atomic(p1); } |