RDMA/srp: Increase max_segment_size
The default behavior of the SCSI core is to set the block layer request
queue parameter max_segment_size to 64 KB. That means that elements of
scatterlists are limited to 64 KB. Since RDMA adapters support larger
sizes, increase max_segment_size for the SRP initiator.
Notes:
- The SCSI max_segment_size parameter was introduced in kernel v5.0. See
also commit 50c2e9107f
("scsi: introduce a max_segment_size
host_template parameters").
- Some other block drivers already set max_segment_size to UINT_MAX,
e.g. nbd and rbd.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
db421a5499
commit
0b5cb3300a
@@ -3823,6 +3823,7 @@ static ssize_t srp_create_target(struct device *dev,
|
||||
target_host->max_id = 1;
|
||||
target_host->max_lun = -1LL;
|
||||
target_host->max_cmd_len = sizeof ((struct srp_cmd *) (void *) 0L)->cdb;
|
||||
target_host->max_segment_size = ib_dma_max_seg_size(ibdev);
|
||||
|
||||
target = host_to_target(target_host);
|
||||
|
||||
|
Reference in New Issue
Block a user