]> git.baikalelectronics.ru Git - kernel.git/commit
bio-integrity: Restore original iterator on verify stage
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 29 Jun 2017 18:31:15 +0000 (11:31 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Jul 2017 22:56:29 +0000 (16:56 -0600)
commitb04c57cf1cef3cec82a696930126896ba792f99d
treed7aa2bcea3e447cce87ab40611e2055a4d628622
parentbdd7f494af3355ddce98b9e59be9bc1a1dc8e7fc
bio-integrity: Restore original iterator on verify stage

Currently ->verify_fn not woks at all because at the moment it is called
bio->bi_iter.bi_size == 0, so we do not iterate integrity bvecs at all.

In order to perform verification we need to know original data vector,
with new bvec rewind API this is trivial.

testcase: https://github.com/dmonakhov/xfstests/commit/3c6509eaa83b9c17cd0bc95d73fcdd76e1c54a85

Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
[hch: adopted for new status values]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c