bio-integrity: fold bio_integrity_enabled to bio_integrity_prep
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 29 Jun 2017 18:31:11 +0000 (11:31 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Jul 2017 22:56:24 +0000 (16:56 -0600)
commite23947bd76f00701f9407af23e671f4da96f5f25
tree94f24da2825f34c411a31f4aa54564c2294aef1d
parentfbd08e7673f950854679e5d79a30bb25e77a9d08
bio-integrity: fold bio_integrity_enabled to bio_integrity_prep

Currently all integrity prep hooks are open-coded, and if prepare fails
we ignore it's code and fail bio with EIO. Let's return real error to
upper layer, so later caller may react accordingly.

In fact no one want to use bio_integrity_prep() w/o bio_integrity_enabled,
so it is reasonable to fold it in to one function.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
[hch: merged with the latest block tree,
return bool from bio_integrity_prep]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/block/data-integrity.txt
block/bio-integrity.c
block/blk-core.c
block/blk-mq.c
drivers/nvdimm/blk.c
drivers/nvdimm/btt.c
include/linux/bio.h