Re: [PATCH] block: reorder and better document the __REQ_* flags

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

 



On 2021/06/25 15:49, Christoph Hellwig wrote:
> Keep the op-specific flag last and make a little more sense of the
> comments.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  include/linux/blk_types.h | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
> index db61f7df1823..c80756e9f16e 100644
> --- a/include/linux/blk_types.h
> +++ b/include/linux/blk_types.h
> @@ -381,15 +381,14 @@ enum req_flag_bits {
>  	 * work item to avoid such priority inversions.
>  	 */
>  	__REQ_CGROUP_PUNT,
> +	__REQ_HIPRI,		/* High Priority I/O (polled) */

REQ_HIPRI requests may not have an actual high priority assigned (rq->ioprio).
So can we change the comment to only say "/* Polled I/O */".
Polled I/O is indeed semantically somewhat equivalent to a high priority
request, but I prefer we clearly distinguish it from it the ioprio stuff.

> +	__REQ_SWAP,		/* swap I/O */
>  
> -	/* command specific flags for REQ_OP_WRITE_ZEROES: */
> -	__REQ_NOUNMAP,		/* do not free blocks when zeroing */
> +	__REQ_DRV,		/* for driver use */
>  
> -	__REQ_HIPRI,
> +	/* command specific flag for REQ_OP_WRITE_ZEROES: */
> +	__REQ_NOUNMAP,		/* do not free blocks when zeroing */
>  
> -	/* for driver use */
> -	__REQ_DRV,
> -	__REQ_SWAP,		/* swapping request. */
>  	__REQ_NR_BITS,		/* stops here */
>  };
>  
> 


-- 
Damien Le Moal
Western Digital Research




[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