bio-integrity: Drop bio_integrity_verify BUG_ON in post bip->bip_iter world
Given that bip->bip_iter.bi_size is decremented after bio_advance() ->
bio_integrity_advance() is called, the BUG_ON() in bio_integrity_verify()
ends up tripping in v3.14-rc1 code with the advent of immutable biovecs
in:
commit d57a5f7c66
Author: Kent Overstreet <kmo@daterainc.com>
Date: Sat Nov 23 17:20:16 2013 -0800
bio-integrity: Convert to bvec_iter
Given that there is no easy way to ascertain the original bi_size
value, go ahead and drop this BUG_ON().
Reported-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Reported-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
d6a25b3131
commit
eec70897d8
|
@ -458,11 +458,10 @@ static int bio_integrity_verify(struct bio *bio)
|
|||
struct blk_integrity_exchg bix;
|
||||
struct bio_vec *bv;
|
||||
sector_t sector = bio->bi_integrity->bip_iter.bi_sector;
|
||||
unsigned int sectors, total, ret;
|
||||
unsigned int sectors, ret = 0;
|
||||
void *prot_buf = bio->bi_integrity->bip_buf;
|
||||
int i;
|
||||
|
||||
ret = total = 0;
|
||||
bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
|
||||
bix.sector_size = bi->sector_size;
|
||||
|
||||
|
@ -484,8 +483,6 @@ static int bio_integrity_verify(struct bio *bio)
|
|||
sectors = bv->bv_len / bi->sector_size;
|
||||
sector += sectors;
|
||||
prot_buf += sectors * bi->tuple_size;
|
||||
total += sectors * bi->tuple_size;
|
||||
BUG_ON(total > bio->bi_integrity->bip_iter.bi_size);
|
||||
|
||||
kunmap_atomic(kaddr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue