diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2017-06-29 11:31:10 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-03 16:56:22 -0600 |
commit | fbd08e7673f950854679e5d79a30bb25e77a9d08 (patch) | |
tree | 7539736c05c4cec5f456b4e41c88d150b7d3353e /include | |
parent | 309a62fa3a9e78cb37a620913151cbb47d83b81d (diff) | |
download | linux-stable-fbd08e7673f950854679e5d79a30bb25e77a9d08.tar.gz linux-stable-fbd08e7673f950854679e5d79a30bb25e77a9d08.tar.bz2 linux-stable-fbd08e7673f950854679e5d79a30bb25e77a9d08.zip |
bio-integrity: fix interface for bio_integrity_trim
bio_integrity_trim inherent it's interface from bio_trim and accept
offset and size, but this API is error prone because data offset
must always be insync with bio's data offset. That is why we have
integrity update hook in bio_advance()
So only meaningful values are: offset == 0, sectors == bio_sectors(bio)
Let's just remove them completely.
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bio.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 664a27da276d..1d74f5120369 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -728,7 +728,7 @@ extern bool bio_integrity_enabled(struct bio *bio); extern int bio_integrity_prep(struct bio *); extern void bio_integrity_endio(struct bio *); extern void bio_integrity_advance(struct bio *, unsigned int); -extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); +extern void bio_integrity_trim(struct bio *); extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); extern int bioset_integrity_create(struct bio_set *, int); extern void bioset_integrity_free(struct bio_set *); @@ -778,8 +778,7 @@ static inline void bio_integrity_advance(struct bio *bio, return; } -static inline void bio_integrity_trim(struct bio *bio, unsigned int offset, - unsigned int sectors) +static inline void bio_integrity_trim(struct bio *bio) { return; } |