Re: [PATCH] tcm_loop: Increase maximum request size

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

 



On 10/3/22 00:09, Bart Van Assche wrote:
On 9/29/22 04:55, 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,

There is more that can be improved for this driver, namely removal of the dma_boundary parameter and increasing max_sectors.

Hi Bart,

Thanks for the feedback!

Should I make these changes as part of this patch, or can I leave them for a
follow up patch?

Thanks,
Nikos



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux