aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-10 17:27:42 -0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 00:56:43 -0500
commit5ceaaad7047745c1c02150c39d3fb623b7948d48 (patch)
treec03201ceda61314a0ec4b521e5d2d4d89bb1f0c2 /drivers/md/bcache/debug.c
parent098fb25498214069e6bbf908515f2952dd7654d0 (diff)
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.c15
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)
189 void *p1 = kmap_atomic(bv->bv_page); 189 void *p1 = kmap_atomic(bv->bv_page);
190 void *p2 = page_address(check->bi_io_vec[i].bv_page); 190 void *p2 = page_address(check->bi_io_vec[i].bv_page);
191 191
192 if (memcmp(p1 + bv->bv_offset, 192 cache_set_err_on(memcmp(p1 + bv->bv_offset,
193 p2 + bv->bv_offset, 193 p2 + bv->bv_offset,
194 bv->bv_len)) 194 bv->bv_len),
195 printk(KERN_ERR 195 dc->disk.c,
196 "bcache (%s): verify failed at sector %llu\n", 196 "verify failed at dev %s sector %llu",
197 bdevname(dc->bdev, name), 197 bdevname(dc->bdev, name),
198 (uint64_t) bio->bi_sector); 198 (uint64_t) bio->bi_sector);
199
199 kunmap_atomic(p1); 200 kunmap_atomic(p1);
200 } 201 }
201 202