bio-integrity: bio_integrity_advance must update integrity seed
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 29 Jun 2017 18:31:09 +0000 (11:31 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Jul 2017 22:56:21 +0000 (16:56 -0600)
SCSI drivers do care about bip_seed so we must update it accordingly.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c

index b8a3a65f73641a591ab7918b56c3a003594bee89..8c2253c59edbcc2920097433cc5acb973cff0287 100644 (file)
@@ -425,6 +425,7 @@ void bio_integrity_advance(struct bio *bio, unsigned int bytes_done)
        struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
        unsigned bytes = bio_integrity_bytes(bi, bytes_done >> 9);
 
+       bip->bip_iter.bi_sector += bytes_done >> 9;
        bvec_iter_advance(bip->bip_vec, &bip->bip_iter, bytes);
 }
 EXPORT_SYMBOL(bio_integrity_advance);