[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f7b9765-8835-25b5-4cdb-bc78edddad37@huawei.com>
Date: Tue, 22 Mar 2022 15:17:24 +0000
From: John Garry <john.garry@...wei.com>
To: Hannes Reinecke <hare@...e.de>, Christoph Hellwig <hch@....de>
CC: <axboe@...nel.dk>, <damien.lemoal@...nsource.wdc.com>,
<bvanassche@....org>, <jejb@...ux.ibm.com>,
<martin.petersen@...cle.com>, <ming.lei@...hat.com>,
<chenxiang66@...ilicon.com>, <linux-block@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-ide@...r.kernel.org>,
<linux-scsi@...r.kernel.org>, <dm-devel@...hat.com>,
<beanhuo@...ron.com>
Subject: Re: [PATCH 01/11] blk-mq: Add blk_mq_init_queue_ops()
On 22/03/2022 14:03, Hannes Reinecke wrote:
>>
>> As mentioned in the cover letter response, it just seems best to keep
>> the normal scsi_cmnd payload but have other means to add on the
>> internal command data, like using host_scribble or scsi_cmnd priv data.
>>
> Well; I found that most drivers I had been looking at the scsi command
> payload isn't used at all; the drivers primarily cared about the
> (driver-provided) payload, and were completely ignoring the scsi command
> payload.
>
> Similar for ATA/libsas: you basically never issue real scsi commands,
> but either 'raw' ATA requests or SCSI TMFs. None of which are scsi
> commands, so providing them is a bit of a waste.
>
> (And causes irritations, too, as a scsi command requires associated
> pointers like ->device etc to be set up. Which makes it tricky to use
> for the initial device setup.)
A problem I see is that in scsi_mq_init_request() we allocate memories
like sense_buffer and prot_sdb and store the pointers in the scsi_cmnd
payload. If we then reuse a scsi_cmnd payload as an "internal" command
payload then this data may be lost.
It might be possible to reuse the scsi cmnd payload for the "internal",
but I would rather not get hung up on it now if possible.
Thanks,
John
Powered by blists - more mailing lists