Re: [PATCH] tcm_loop: Increase maximum request size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/29/22 6:55 AM, Nikos Tsironis wrote:
> Increase the maximum request size for tcm_loop, by setting sg_tablesize
> to SG_MAX_SEGMENTS.
> 
> The current value of 256 for sg_tablesize limits the request size to
> PAGE_SIZE * 256, which for 4K pages is 1MiB.
> 
> Signed-off-by: Nikos Tsironis <ntsironis@xxxxxxxxxxx>
> ---
>  drivers/target/loopback/tcm_loop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> index 4407b56aa6d1..6d7c3ebd8613 100644
> --- a/drivers/target/loopback/tcm_loop.c
> +++ b/drivers/target/loopback/tcm_loop.c
> @@ -308,7 +308,7 @@ static struct scsi_host_template tcm_loop_driver_template = {
>  	.eh_device_reset_handler = tcm_loop_device_reset,
>  	.eh_target_reset_handler = tcm_loop_target_reset,
>  	.this_id		= -1,
> -	.sg_tablesize		= 256,
> +	.sg_tablesize		= SG_MAX_SEGMENTS,
>  	.max_sectors		= 0xFFFF,
>  	.dma_boundary		= PAGE_SIZE - 1,
>  	.module			= THIS_MODULE,

I think you need to make this configurable.

If you use loop with pscsi, then the sgl that loop now gets might be too
big for the backend device so we now fail in:

pscsi_map_sg -> blk_rq_append_bio -> ll_back_merge_fn

So some users might be relying on the smaller limit.




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux