block: introduce BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags
authorAnuj Gupta <anuj20.g@samsung.com>
Thu, 28 Nov 2024 11:22:37 +0000 (16:52 +0530)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2024 13:58:15 +0000 (06:58 -0700)
commit2ce55b4955052b2cd2fb5bd790353258d5d03817
tree0e60ab6d59ffed29f2bc3dc0217c0ea2f4fb14dd
parent4dde0cc4459cfc366b0227790eec122bce576990
block: introduce BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags

This patch introduces BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags which
indicate how the hardware should check the integrity payload.
BIP_CHECK_GUARD/REFTAG are conversion of existing semantics, while
BIP_CHECK_APPTAG is a new flag. The driver can now just rely on block
layer flags, and doesn't need to know the integrity source. Submitter
of PI decides which tags to check. This would also give us a unified
interface for user and kernel generated integrity.

Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20241128112240.8867-8-anuj20.g@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c
drivers/nvme/host/core.c
include/linux/bio-integrity.h