Re: [PATCH v2 05/20] scsi: core: Add support for internal commands

John Garry
2021-11-22T18:08:17Z

On 22/11/2021 17:46, Bart Van Assche wrote:
>>
>> struct scsi_cmnd *scsi_get_internal_cmd(struct scsi_device *sdev, ..)
>> struct scsi_cmnd *scsi_host_get_internal_cmd(struct Scsi_Host *shost, ..)
>
> Passing a request queue pointer as first argument instead of a struct
> scsi_device is a deliberate choice. In the UFS driver (and probably also
> in other SCSI LLDs) we want to allocate internal requests without these
> requests being visible in any existing SCSI device statistics.

> Creating
> a new SCSI device for the allocation of internal requests is not a good
> choice because that new SCSI device would have to be assigned a LUN
> number and would be visible in sysfs.

But I was not suggesting that.

Hannes series which he points us at recently added an "admin"
request_queue for a scsi_host, for when we don't want or need a reserved
commands associated with an sdev. I assumed that you would do something
similar to this, which would replace ufs_hba.cmd_queue.

Thanks,
John