[PATCHv6 1/8] block: expose blk_stat_{enable,disable}_accounting() to drivers

Nilay Shroff nilay at linux.ibm.com
Thu May 21 23:18:44 PDT 2026


On 5/21/26 5:36 PM, John Garry wrote:
> On 20/05/2026 19:20, Nilay Shroff wrote:
>> The functions blk_stat_enable_accounting() and
>> blk_stat_disable_accounting() are currently exported, but their
>> prototypes are only defined in a private header. Move these prototypes
>> into a common header so that block drivers can directly use these APIs.
>>
>> Reviewed-by: Hannes Reinecke<hare at suse.de>
>> Reviewed-by: Sagi Grimberg<sagi at grimberg.me>
>> Signed-off-by: Nilay Shroff<nilay at linux.ibm.com>
>> ---
>>   block/blk-stat.h       | 4 ----
>>   include/linux/blk-mq.h | 4 ++++
> 
> struct request_queue comes from blkdev.h, so maybe that would be a more appropriate place to locate the prototype.
> 
yes both blk-mq.h and blkdev.h should work well. We do also have few
prototypes defined in linux/blk-mq.h which uses request_queue. Personally
I don't have anything against using blkdev.h. So I will move it under
blkdev.h.

Thanks,
--Nilay



More information about the Linux-nvme mailing list