Re: [PATCH 1/2] block: modify blk_mq_plug() to allow only reads for zoned block devices

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

 



On 9/27/22 9:20 AM, Pankaj Raghav wrote:
>>> I guess the second patch should be enough to apply plugging when
>>> applicable for uring_cmd based nvme passthrough requests.
>>
>> Do we even need the 2nd patch? If we're just doing passthrough for the
>> blk_execute_nowait() API, then the condition should never trigger? 
> 
> I think this was the question I raised in your first version of the series.
> 
> If we do a NVMe write using the passthrough interface, then we will be
> using REQ_OP_DRV_OUT op, which is:
> 
> REQ_OP_DRV_OUT		= (__force blk_opf_t)35, // write bit is set
> 
> The condition in blk_mq_plug() will trigger as we only check if it is a
> _write_ (op & (__force blk_opf_t)1) to the device. Am I missing something?

Ah yes, good point. We used to have this notion of 'fs' request, don't
think we do anymore. Because it really should just be:

if (zoned && (op & REQ_OP_WRITE) && fs_request)
         return NULL;

for that condition imho. I guess we could make it:

if (zoned && (op & REQ_OP_WRITE) && !(op & REQ_OP_DRV_OUT))
         return NULL;

-- 
Jens Axboe



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux