Skip to content

Commit 61ca3b8

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: handle pi_tuple_size in queue_limits_stack_integrity
queue_limits_stack_integrity needs to handle the new pi_tuple_size field, otherwise stacking PI-capable devices will always fail. Fixes: 76e4525 ("block: introduce pi_tuple_size field in blk_integrity") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Anuj Gupta <anuj20.g@samsung.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20250818045456.1482889-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 0227af3 commit 61ca3b8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

block/blk-settings.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,8 @@ bool queue_limits_stack_integrity(struct queue_limits *t,
972972
goto incompatible;
973973
if (ti->csum_type != bi->csum_type)
974974
goto incompatible;
975+
if (ti->pi_tuple_size != bi->pi_tuple_size)
976+
goto incompatible;
975977
if ((ti->flags & BLK_INTEGRITY_REF_TAG) !=
976978
(bi->flags & BLK_INTEGRITY_REF_TAG))
977979
goto incompatible;
@@ -980,6 +982,7 @@ bool queue_limits_stack_integrity(struct queue_limits *t,
980982
ti->flags |= (bi->flags & BLK_INTEGRITY_DEVICE_CAPABLE) |
981983
(bi->flags & BLK_INTEGRITY_REF_TAG);
982984
ti->csum_type = bi->csum_type;
985+
ti->pi_tuple_size = bi->pi_tuple_size;
983986
ti->metadata_size = bi->metadata_size;
984987
ti->pi_offset = bi->pi_offset;
985988
ti->interval_exp = bi->interval_exp;

0 commit comments

Comments
 (0)