Skip to content

Commit 832d729

Browse files
author
Ewan D. Milne
committed
scsi: storvsc: Explicitly set max_segment_size to UINT_MAX
JIRA: https://issues.redhat.com/browse/RHEL-97171 Upstream Status: From upstream Martin Petersen's linux-scsi branch "fixes" git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi storvsc uses virt_boundary to define 'segment' and does not define max_segment_size. Explicitly set max_segment_size to UINT_MAX, otherwise __blk_rq_map_sg() takes default 64K max segment size and splits one virtual segment into two parts, then breaks virt_boundary limit. Before commit ec84ca4 ("scsi: block: Remove now unused queue limits helpers"), max segment size was set to UINT_MAX in the case where virt_boundary was defined. Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Wei Liu <wei.liu@kernel.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Ewan D. Milne <emilne@redhat.com> Cc: Laurence Oberman <loberman@redhat.com> Fixes: ec84ca4 ("scsi: block: Remove now unused queue limits helpers") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20250616160509.52491-1-ming.lei@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 19ec970841ca3135e53268a6bb08a850880479bb) Signed-off-by: Ewan D. Milne <emilne@redhat.com>
1 parent 3dccfc9 commit 832d729

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/storvsc_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@ static struct scsi_host_template scsi_driver = {
18911891
.no_write_same = 1,
18921892
.track_queue_depth = 1,
18931893
.change_queue_depth = storvsc_change_queue_depth,
1894+
.max_segment_size = 0xffffffff,
18941895
};
18951896

18961897
enum {

0 commit comments

Comments
 (0)