[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230503183821.1473305-6-john.g.garry@oracle.com>
Date: Wed, 3 May 2023 18:38:10 +0000
From: John Garry <john.g.garry@...cle.com>
To: axboe@...nel.dk, kbusch@...nel.org, hch@....de, sagi@...mberg.me,
martin.petersen@...cle.com, djwong@...nel.org,
viro@...iv.linux.org.uk, brauner@...nel.org, dchinner@...hat.com,
jejb@...ux.ibm.com
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org, paul@...l-moore.com,
jmorris@...ei.org, serge@...lyn.com,
Himanshu Madhani <himanshu.madhani@...cle.com>,
John Garry <john.g.garry@...cle.com>
Subject: [PATCH RFC 05/16] block: Add REQ_ATOMIC flag
From: Himanshu Madhani <himanshu.madhani@...cle.com>
Add flag REQ_ATOMIC, meaning an atomic operation. This should only be
used in conjunction with REQ_OP_WRITE.
We will not add a special "request atomic write" operation, as to try to
avoid maintenance effort for an operation which is almost the same as
REQ_OP_WRITE.
This flag was originally proposed by Chris Mason for an atomic writes
proposal some time ago.
Signed-off-by: Himanshu Madhani <himanshu.madhani@...cle.com>
Signed-off-by: John Garry <john.g.garry@...cle.com>
---
include/linux/blk_types.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 99be590f952f..347b52e00322 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -417,6 +417,7 @@ enum req_flag_bits {
__REQ_SWAP, /* swap I/O */
__REQ_DRV, /* for driver use */
+ __REQ_ATOMIC, /* for atomic write operations */
/*
* Command specific flags, keep last:
*/
@@ -444,6 +445,7 @@ enum req_flag_bits {
#define REQ_BACKGROUND (__force blk_opf_t)(1ULL << __REQ_BACKGROUND)
#define REQ_NOWAIT (__force blk_opf_t)(1ULL << __REQ_NOWAIT)
#define REQ_CGROUP_PUNT (__force blk_opf_t)(1ULL << __REQ_CGROUP_PUNT)
+#define REQ_ATOMIC (__force blk_opf_t)(1ULL << __REQ_ATOMIC)
#define REQ_NOUNMAP (__force blk_opf_t)(1ULL << __REQ_NOUNMAP)
#define REQ_POLLED (__force blk_opf_t)(1ULL << __REQ_POLLED)
--
2.31.1
Powered by blists - more mailing lists