From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: John Garry <john.garry@huawei.com>, hch@lst.de
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
linux-doc@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 1/2] libata: Use scsi cmnd budget token for qc tag for SAS host
Date: Wed, 6 Apr 2022 17:10:14 +0900 [thread overview]
Message-ID: <0c6c0c64-74f8-e15a-d79e-0866b5cc209d@opensource.wdc.com> (raw)
In-Reply-To: <ab6a13c1-90c4-63f0-c48d-c1faa0ae68fd@huawei.com>
On 4/6/22 16:12, John Garry wrote:
> On 06/04/2022 02:39, Damien Le Moal wrote:
>> On 4/4/22 23:53, John Garry wrote:
>>> For attaining a qc tag for a SAS host we need to allocate a bit in
>>> ata_port.sas_tag_allocated bitmap.
>>>
>>> However we already have a unique tag per device in range
>>> [0, ATA_MAX_QUEUE) in the scsi cmnd budget token, so just use that
>>> instead.
>>
>> The valid range is [0, ATA_MAX_QUEUE - 1]. Tag ATA_MAX_QUEUE is
>> ATA_TAG_INTERNAL which is never allocated as a valid device tag but
>> used directly in ata_exec_internal().
>
> But that is what I have in [0, ATA_MAX_QUEUE), which is same as [0,
> ATA_MAX_QUEUE - 1].
Oh ! I missed the ")" !
I would prefer an explicit [0, ATA_MAX_QUEUE - 1] to be clear :)
>
> Thanks,
> john
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-04-06 12:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-04 14:53 [PATCH v2 0/2] libata: A tagging improvement and related code reorg John Garry
2022-04-04 14:53 ` [PATCH v2 1/2] libata: Use scsi cmnd budget token for qc tag for SAS host John Garry
2022-04-06 1:39 ` Damien Le Moal
2022-04-06 7:12 ` John Garry
2022-04-06 8:10 ` Damien Le Moal [this message]
2022-04-04 14:53 ` [PATCH v2 2/2] libata: Inline ata_qc_new_init() in ata_scsi_qc_new() John Garry
2022-04-05 5:52 ` Christoph Hellwig
2022-04-06 1:48 ` Damien Le Moal
2022-04-06 7:16 ` John Garry
2022-04-06 8:10 ` Damien Le Moal
2022-04-06 8:11 ` Christoph Hellwig
2022-04-06 1:47 ` Damien Le Moal
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=0c6c0c64-74f8-e15a-d79e-0866b5cc209d@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=hch@lst.de \
--cc=john.garry@huawei.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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).