public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: reorder the REQ_ flags
@ 2022-05-10 13:00 Christoph Hellwig
  2022-05-10 23:03 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2022-05-10 13:00 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

Keep the op-specific flag last.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/blk_types.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index c62274466e726..9be1225ebe682 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -408,16 +408,14 @@ enum req_flag_bits {
 	 * work item to avoid such priority inversions.
 	 */
 	__REQ_CGROUP_PUNT,
-
-	/* command specific flags for REQ_OP_WRITE_ZEROES: */
-	__REQ_NOUNMAP,		/* do not free blocks when zeroing */
-
 	__REQ_POLLED,		/* caller polls for completion using bio_poll */
 	__REQ_ALLOC_CACHE,	/* allocate IO from cache if available */
+	__REQ_SWAP,		/* swap I/O */
+	__REQ_DRV,		/* for driver use */
+
+	/* 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 */
 };
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: reorder the REQ_ flags
  2022-05-10 13:00 [PATCH] block: reorder the REQ_ flags Christoph Hellwig
@ 2022-05-10 23:03 ` Jens Axboe
  2022-05-11  7:31   ` Chaitanya Kulkarni
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2022-05-10 23:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block

On 5/10/22 7:00 AM, Christoph Hellwig wrote:
> Keep the op-specific flag last.

Not that I'm against the patch, but we really should have some
justification in the commit message as to why the change is
useful or needed.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: reorder the REQ_ flags
  2022-05-10 23:03 ` Jens Axboe
@ 2022-05-11  7:31   ` Chaitanya Kulkarni
  0 siblings, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2022-05-11  7:31 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig; +Cc: linux-block@vger.kernel.org

On 5/10/2022 4:03 PM, Jens Axboe wrote:
> On 5/10/22 7:00 AM, Christoph Hellwig wrote:
>> Keep the op-specific flag last.
> 
> Not that I'm against the patch, but we really should have some
> justification in the commit message as to why the change is
> useful or needed.
> 

Something like following might be useful :-

"Currently we support seven request flags out of which only
__REQ_NOUNMAP is used with REQ_OP_WRITE_ZEROES, rest of the flags are
not necessarily associated with specific REQ_OP_XXX. Instead of mixing
the request specific flags with the non-request specific flags, move
request specific flags __REQ_NOUNMAP at the end for better readability
so future request specific flags can go at the end."

Full disclosure I've not verified other flags.

-ck



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-11  7:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-10 13:00 [PATCH] block: reorder the REQ_ flags Christoph Hellwig
2022-05-10 23:03 ` Jens Axboe
2022-05-11  7:31   ` Chaitanya Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox