Re: [LSF/MM TOPIC] blk-mq private tags for SCSI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/28/19 3:03 PM, Christoph Hellwig wrote:
On Thu, Jan 24, 2019 at 08:52:20AM +0100, Hannes Reinecke wrote:
Hi all,

blk-mq has the concept of 'private' tags to handle driver-internal commands.
Also quite some SCSI HBAs use internal commands for configuration, event
handling etc.
But sadly no interface to use the 'private' tags from the block layer
exists, so quite some drivers like megaraid_sas, aacraid, or hpsa have to
implement their own management of internal commands.

Well, it would be rather trivial to expose, just waiting for a user.
Please just go ahead and add the interface together with your first
user.

The biggest blocker so far has been that the legacy request code has no
concept of reserved requests and adding them for blk-mq only would lead
to diverging code paths.  With the legacy code gone now we are free to
move ahead.

But that is precisely the point: which interface?

The most straigthforward approach would be something like 'blk_mq_get_private_request()' (ie similar to the existing 'blk_mq_get_request()'). But that requires a working request queue and will expose a 'struct request', (and by implication a struct scsi_cmnd).

For most users of private tags/commands we need to be the queue working _prior_ to setting up the 'normal' request queues, as the commands are used to fetch information from the hardware required to setup the queues. And typically the 'private' commands are driver-specific, ie the payload _after_ the scsi command, so the allocation for the request and the scsi command is pretty much pointless here.

The alternative approach would be to define an interface into the block layer to get the 'raw' tag directly from the tagset, but that is quite some surgery in the block layer which I won't attempt without further confirmation that this is the way we will be going.

Cheers,

Hannes
--
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux