diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-09-10 14:27:42 -0700 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-10 21:56:43 -0800 |
commit | 5ceaaad7047745c1c02150c39d3fb623b7948d48 (patch) | |
tree | c03201ceda61314a0ec4b521e5d2d4d89bb1f0c2 /drivers/md/bcache/debug.c | |
parent | 098fb25498214069e6bbf908515f2952dd7654d0 (diff) | |
download | op-kernel-dev-5ceaaad7047745c1c02150c39d3fb623b7948d48.zip op-kernel-dev-5ceaaad7047745c1c02150c39d3fb623b7948d48.tar.gz |
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 e99e6b8..264fcfb 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); } |