All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Douglas Gilbert <dgilbert@interlog.com>,
	<linux-scsi@vger.kernel.org>, <martin.petersen@oracle.com>,
	<jejb@linux.vnet.ibm.com>, <kashyap.desai@broadcom.com>,
	<axboe@kernel.dk>
Subject: Re: [PATCH] scsi_debug: fix cmd_per_lun, set to max_queue
Date: Fri, 16 Apr 2021 10:07:39 +0100	[thread overview]
Message-ID: <23078a4f-5fab-2a21-8c3f-d293c8e05402@huawei.com> (raw)
In-Reply-To: <YHlP4J2MKSCM+phB@T590>

On 16/04/2021 09:50, Ming Lei wrote:
>>>> My concern here is that it is a common pattern in LLDDs to overwrite the
>>>> initial shost member values between scsi_host_alloc() and scsi_add_host().
>>> OK, then can we move the fix into beginning of scsi_add_host()?
>> I suppose that would be ok, but we don't do much sanitizing shost values at
>> that point. Apart from failing can_queue == 0.
> .can_queue has been finalized in scsi_add_host(), since it will be used for
> setting tagset, so .can_queue is reliable at that time.
> 
>> I suppose failing can_queue < cmd_per_lun could also be added.
> That will fail add host for scsi_debug simply.

But we still should have Doug's patch regardless.

Anyway, I'll prepare a patch, so we can discuss further on that thread.

Thanks,
John

  reply	other threads:[~2021-04-16  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  1:50 [PATCH] scsi_debug: fix cmd_per_lun, set to max_queue Douglas Gilbert
2021-04-15  9:15 ` John Garry
2021-04-16  1:46   ` Ming Lei
2021-04-16  8:17     ` John Garry
2021-04-16  8:26       ` Ming Lei
2021-04-16  8:33         ` John Garry
2021-04-16  8:50           ` Ming Lei
2021-04-16  9:07             ` John Garry [this message]
2021-04-16  9:12 ` John Garry
2021-04-16 16:32   ` Douglas Gilbert
2021-04-29 13:17     ` John Garry

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=23078a4f-5fab-2a21-8c3f-d293c8e05402@huawei.com \
    --to=john.garry@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=dgilbert@interlog.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.