]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
t10-pi: reduce ref tag code duplication
authorCaleb Sander Mateos <csander@purestorage.com>
Wed, 15 Apr 2026 21:08:47 +0000 (15:08 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 17 Apr 2026 20:23:26 +0000 (14:23 -0600)
commit2f5015461984caa8ebf265a60b22f38c94d9c70a
treee76409dd333e835275c137746769edea16d904fb
parent64b437c4a96ae088d46c7d9930c35e77ee1b5b21
t10-pi: reduce ref tag code duplication

t10_pi_ref_tag() and ext_pi_ref_tag() are identical except for the final
truncation of the ref tag to 32 or 48 bits. Factor out a helper
full_pi_ref_tag() to return the untruncated ref tag and use it in
t10_pi_ref_tag() and ext_pi_ref_tag().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260415210847.1730016-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/t10-pi.h