summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2017-06-29 11:31:11 -0700
committerJens Axboe <axboe@kernel.dk>2017-07-03 16:56:24 -0600
commite23947bd76f00701f9407af23e671f4da96f5f25 (patch)
tree94f24da2825f34c411a31f4aa54564c2294aef1d /Documentation
parentfbd08e7673f950854679e5d79a30bb25e77a9d08 (diff)
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/block/data-integrity.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/Documentation/block/data-integrity.txt b/Documentation/block/data-integrity.txt
index f56ec97f0d14..934c44ea0c57 100644
--- a/Documentation/block/data-integrity.txt
+++ b/Documentation/block/data-integrity.txt
@@ -192,7 +192,7 @@ will require extra work due to the application tag.
supported by the block device.
- int bio_integrity_prep(bio);
+ bool bio_integrity_prep(bio);
To generate IMD for WRITE and to set up buffers for READ, the
filesystem must call bio_integrity_prep(bio).
@@ -201,9 +201,7 @@ will require extra work due to the application tag.
sector must be set, and the bio should have all data pages
added. It is up to the caller to ensure that the bio does not
change while I/O is in progress.
-
- bio_integrity_prep() should only be called if
- bio_integrity_enabled() returned 1.
+ Complete bio with error if prepare failed for some reson.
5.3 PASSING EXISTING INTEGRITY METADATA