Re: [PATCH v2 03/11] block: Introduce blk_rq_is_seq_zoned_write()

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

 



On 4/20/23 06:12, Bart Van Assche wrote:
> On 4/18/23 21:50, Christoph Hellwig wrote:
>> On Tue, Apr 18, 2023 at 03:39:54PM -0700, Bart Van Assche wrote:
>>> +/**
>>> + * blk_rq_is_seq_zoned_write() - Whether @rq is a zoned write for which the order matters.
>>
>> Maybe:
>>
>>   * blk_rq_is_seq_zoned_write() - check if @rq needs zoned write serialization
> 
> That looks better to me :-)
> 
>>> +bool blk_rq_is_seq_zoned_write(struct request *rq)
>>> +{
>>> +	switch (req_op(rq)) {
>>> +	case REQ_OP_WRITE:
>>> +	case REQ_OP_WRITE_ZEROES:
>>> +		return blk_rq_zone_is_seq(rq);
>>> +	case REQ_OP_ZONE_APPEND:
>>> +	default:
>>
>> The REQ_OP_ZONE_APPEND case here is superflous.
> 
> Agreed, but I'd like to keep it since last time I posted this patch I 
> was asked whether I had perhaps overlooked the REQ_OP_ZONE_APPEND case. 
> I added "case REQ_OP_ZONE_APPEND:" to prevent such questions. Are you OK 
> with keeping "case REQ_OP_ZONE_APPEND:" or do you perhaps prefer that I 
> remove it?
> 

Could also have a comment on top of the switch explicitly saying that only WRITE
and WRITE ZEROES need to be checked, and that all other commands, including zone
append writes, do not have strong reordering requirements. This way, no need to
superfluous cases.

> Bart.
> 




[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