Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: John Garry <john.g.garry@oracle.com>,
	Mike Christie <michael.christie@oracle.com>,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	james.bottomley@hansenpartnership.com,
	virtualization@lists.linux.dev, mst@redhat.com,
	pbonzini@redhat.com, stefanha@redhat.com, eperezma@redhat.com
Subject: Re: [PATCH 3/4] scsi: Support scsi_devices without a device wide limit
Date: Thu, 23 Apr 2026 12:32:06 +0200	[thread overview]
Message-ID: <3c57a174-ce83-43cd-a46b-d0eea752deda@suse.de> (raw)
In-Reply-To: <65e78d0c-23a5-4702-9946-60b83532a61b@oracle.com>

On 4/23/26 12:02, John Garry wrote:
> On 22/04/2026 14:15, Hannes Reinecke wrote:
>>> --- a/drivers/scsi/scsi_scan.c
>>> +++ b/drivers/scsi/scsi_scan.c
>>> @@ -352,18 +352,20 @@ static struct scsi_device 
>>> *scsi_alloc_sdev(struct scsi_target *starget,
>>>       if (scsi_device_is_pseudo_dev(sdev))
>>>           return sdev;
>>> -    depth = sdev->host->cmd_per_lun ?: 1;
>>> +    if (sdev->host->cmd_per_lun != SCSI_UNLIMITED_CMD_PER_LUN) {
>>> +        depth = sdev->host->cmd_per_lun ?: 1;
>> Why don't we use a simple flag in the host (or host template) to
>> indicate that cmd_per_lun should be ignored?
>> I'm not in favour of using magic values for a setting which
>> otherwise is a limit.
>> Look to dev_loss_tmo as a bad example ...
> 
> I think it's better to not have a flag and also keep cmd_per_lun, as 
> then we need to sanitize one vs the other. As mentioned in the cover 
> letter response, cmd_per_lun could be got rid off / reworked.
> 
> Personally I also dislike how the scsi budget code checks for a budget 
> map being non-NULL (which is for reserved scsi devices, which doesn't 
> need a per-sdev budget map).

Let's see if we can schedule a session at LSF; I really would like to
get this one sorted out.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

  reply	other threads:[~2026-04-23 10:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 22:57 [PATCH 0/4] scsi: Support devices that don't have a cmd_per_lun limit Mike Christie
2026-04-17 22:57 ` [PATCH 1/4] scsi: Fix can_queue comments Mike Christie
2026-04-20  8:28   ` John Garry
2026-04-17 22:57 ` [PATCH 2/4] scsi: qedi: Fix command overqueueing Mike Christie
2026-04-20 16:45   ` Bart Van Assche
2026-04-20 17:47     ` Mike Christie
2026-04-20 18:02       ` Bart Van Assche
2026-04-20 18:48         ` Mike Christie
2026-04-17 22:57 ` [PATCH 3/4] scsi: Support scsi_devices without a device wide limit Mike Christie
2026-04-20 16:51   ` Bart Van Assche
2026-04-22 13:15   ` Hannes Reinecke
2026-04-22 18:06     ` Mike Christie
2026-04-23 10:02     ` John Garry
2026-04-23 10:32       ` Hannes Reinecke [this message]
2026-04-27  1:33         ` Martin K. Petersen
2026-04-17 22:57 ` [PATCH 4/4] virtio-scsi: " Mike Christie
2026-04-20 17:30   ` Stefan Hajnoczi
2026-04-20 17:37   ` Bart Van Assche
2026-04-20 17:33 ` [PATCH 0/4] scsi: Support devices that don't have a cmd_per_lun limit Stefan Hajnoczi
2026-04-22 18:05   ` Mike Christie
2026-04-23  9:45     ` Hannes Reinecke
2026-04-23 16:40       ` Bart Van Assche
2026-04-24  5:45         ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c57a174-ce83-43cd-a46b-d0eea752deda@suse.de \
    --to=hare@suse.de \
    --cc=eperezma@redhat.com \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox