From: John Garry <john.garry@huawei.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
<jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
<bvanassche@acm.org>, <ming.lei@redhat.com>, <hare@suse.de>,
<linux-ide@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-scsi@vger.kernel.org>, <martin.wilck@suse.com>
Subject: Re: [PATCH RFC 2/2] libata: Use scsi cmnd budget token for qc tag for SAS host
Date: Wed, 16 Mar 2022 10:46:57 +0000 [thread overview]
Message-ID: <4dfcddff-7736-e01e-7fcf-804de77ac623@huawei.com> (raw)
In-Reply-To: <20220316083439.GA6701@lst.de>
On 16/03/2022 08:34, Christoph Hellwig wrote:
> In addition to the comments from Damien: I think we should kill
> ata_qc_new_init as well. It is a bit pointless and having it in
> libata-core.c when it pokes into scsi internals also doesn't make sense.
>
> So maybe something like:
Seems reasonable to me at least.
But I'd send these as 2x separate patches.
> * sata_async_notification - SATA async notification handler
> * @ap: ATA port where async notification is received
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index ed8be585a98f7c..5e0bc7b05a107e 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -638,24 +638,44 @@ EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
> static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
> struct scsi_cmnd *cmd)
> {
...
>
> - if (scsi_cmd_to_rq(cmd)->rq_flags & RQF_QUIET)
> - qc->flags |= ATA_QCFLAG_QUIET;
> + if (ap->flags & ATA_FLAG_SAS_HOST) {
> + /* XXX: add a comment here why SAS is different */
I think this is simply because SAS hosts have shost.can_queue > 32
> + if (WARN_ON_ONCE(cmd->budget_token >= ATA_MAX_QUEUE))
> + goto fail;
> + tag = cmd->budget_token;
thanks,
John
next prev parent reply other threads:[~2022-03-16 10:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 10:39 [PATCH 0/2] scsi/libata: A potential tagging fix and improvement John Garry
2022-03-15 10:39 ` [PATCH 1/2] scsi: core: Fix sbitmap depth in scsi_realloc_sdev_budget_map() John Garry
2022-03-15 14:33 ` Bart Van Assche
2022-03-15 15:11 ` John Garry
2022-03-15 14:38 ` Ming Lei
2022-03-15 10:39 ` [PATCH RFC 2/2] libata: Use scsi cmnd budget token for qc tag for SAS host John Garry
2022-03-16 3:21 ` Damien Le Moal
2022-03-16 8:23 ` John Garry
2022-03-16 8:34 ` Christoph Hellwig
2022-03-16 10:46 ` John Garry [this message]
2022-03-16 23:23 ` Damien Le Moal
2022-03-16 3:25 ` [PATCH 0/2] scsi/libata: A potential tagging fix and improvement Damien Le Moal
2022-03-16 8:15 ` 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=4dfcddff-7736-e01e-7fcf-804de77ac623@huawei.com \
--to=john.garry@huawei.com \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=martin.wilck@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).