[RH7,2/9] block: add REQ_BACKGROUND

Submitted by Pavel Tikhomirov on Sept. 21, 2019, 8:32 a.m.

Details

Message ID 20190921083227.8990-3-ptikhomirov@virtuozzo.com
State New
Series "block: backport writeback throttling"
Headers show

Commit Message

Pavel Tikhomirov Sept. 21, 2019, 8:32 a.m.
From: Jens Axboe <axboe@fb.com>

This adds a new request flag, REQ_BACKGROUND, that callers can use to
tell the block layer that this is background (non-urgent) IO.

Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>

https://jira.sw.ru/browse/PSBM-96243

(cherry picked from commit 1d796d6a9641fbfcd90fcfaf6fb4894a13d0304f)
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 include/linux/blk_types.h | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index c0e1caa89985..aecb3b0e21a6 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -189,6 +189,7 @@  enum rq_flag_bits {
 
 	/* bio only flags */
 	__REQ_RAHEAD,		/* read ahead, can fail anytime */
+	__REQ_BACKGROUND,	/* background IO */
 	__REQ_THROTTLED,	/* This bio has already been subjected to
 				 * throttling rules. Don't do it again. */
 
@@ -231,6 +232,7 @@  enum rq_flag_bits {
 #define REQ_DISCARD		(1ULL << __REQ_DISCARD)
 #define REQ_WRITE_SAME		(1ULL << __REQ_WRITE_SAME)
 #define REQ_NOIDLE		(1ULL << __REQ_NOIDLE)
+#define REQ_BACKGROUND		(1ULL << __REQ_BACKGROUND)
 
 #define REQ_FAILFAST_MASK \
 	(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)