Skip to content
  1. May 03, 2021
    • Douglas Gilbert's avatar
      scsi: scsi_debug: Fix cmd_per_lun, set to max_queue · fc09acb7
      Douglas Gilbert authored
      
      
      Make sure that the cmd_per_lun value placed in the host template never
      exceeds the can_queue value. If the max_queue driver parameter is not
      specified then both cmd_per_lun and can_queue are set to CAN_QUEUE.
      CAN_QUEUE is a compile time constant and is used to dimension an array to
      hold queued requests. If the max_queue driver parameter is given it is must
      be less than or equal to CAN_QUEUE and if so, the host template values are
      adjusted.
      
      Remove undocumented code that allowed queue_depth to exceed CAN_QUEUE and
      cause stack full type errors. There is a documented way to do that with
      every_nth and
      
          echo 0x8000 > /sys/bus/pseudo/drivers/scsi_debug/opts
      
      See: https://sg.danny.cz/sg/scsi_debug.html
      
      Tweak some formatting, and add a suggestion to the "trim poll_queues"
      warning.
      
      Link: https://lore.kernel.org/r/20210415015031.607153-1-dgilbert@interlog.com
      Reported-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
      Reviewed-by: default avatarJohn Garry <john.garry@hauwei.com>
      Signed-off-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      fc09acb7
  2. Apr 29, 2021
  3. Apr 27, 2021
  4. Apr 22, 2021
  5. Apr 16, 2021