Skip to content

Commit 5dbb3cb

Browse files
Anuj Guptaaxboe
authored andcommitted
block: define set of integrity flags to be inherited by cloned bip
Introduce BIP_CLONE_FLAGS describing integrity flags that should be inherited in the cloned bip from the parent. Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Anuj Gupta <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Keith Busch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 7cd7b95 commit 5dbb3cb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

block/bio-integrity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
559559

560560
bip->bip_vec = bip_src->bip_vec;
561561
bip->bip_iter = bip_src->bip_iter;
562-
bip->bip_flags = bip_src->bip_flags & ~BIP_BLOCK_INTEGRITY;
562+
bip->bip_flags = bip_src->bip_flags & BIP_CLONE_FLAGS;
563563

564564
return 0;
565565
}

include/linux/bio-integrity.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ struct bio_integrity_payload {
3030
struct bio_vec bip_inline_vecs[];/* embedded bvec array */
3131
};
3232

33+
#define BIP_CLONE_FLAGS (BIP_MAPPED_INTEGRITY | BIP_CTRL_NOCHECK | \
34+
BIP_DISK_NOCHECK | BIP_IP_CHECKSUM)
35+
3336
#ifdef CONFIG_BLK_DEV_INTEGRITY
3437

3538
#define bip_for_each_vec(bvl, bip, iter) \

0 commit comments

Comments
 (0)