Skip to content

Commit eb39787

Browse files
author
CKI KWF Bot
committed
Merge: scsi: storvsc: Explicitly set max_segment_size to UINT_MAX
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1062 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> Approved-by: Chris Leech <cleech@redhat.com> Approved-by: Maurizio Lombardi <mlombard@redhat.com> Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 1b6870a + 832d729 commit eb39787

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)