lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220110091046.17010-8-jianchao.wan9@gmail.com>
Date:   Mon, 10 Jan 2022 17:10:40 +0800
From:   Wang Jianchao <jianchao.wan9@...il.com>
To:     axboe@...nel.dk
Cc:     jbacik@...com, tj@...nel.org, bvanassche@....org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 07/13] blk: use standalone macro to control bio.bi_iocost_cost

From: Wang Jianchao <wangjianchao@...ishou.com>

This is a preparation to make iocost modular

Signed-off-by: Wang Jianchao <wangjianchao@...ishou.com>
---
 block/Kconfig             | 4 ++++
 block/bio.c               | 2 +-
 include/linux/blk_types.h | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index 50cc1b56852c..e1b1bff5c1e9 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -26,6 +26,9 @@ menuconfig BLOCK
 
 if BLOCK
 
+config BLK_BIO_IOCOST
+	bool
+
 config BLK_RQ_ALLOC_TIME
 	bool
 
@@ -134,6 +137,7 @@ config BLK_CGROUP_IOCOST
 	bool "Enable support for cost model based cgroup IO controller"
 	depends on BLK_CGROUP
 	select BLK_RQ_ALLOC_TIME
+	select BLK_BIO_IOCOST
 	help
 	Enabling this option enables the .weight interface for cost
 	model based proportional IO control.  The IO controller
diff --git a/block/bio.c b/block/bio.c
index 15ab0d6d1c06..a9e2347b0021 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -268,7 +268,7 @@ void bio_init(struct bio *bio, struct bio_vec *table,
 #ifdef CONFIG_BLK_CGROUP
 	bio->bi_blkg = NULL;
 	bio->bi_issue.value = 0;
-#ifdef CONFIG_BLK_CGROUP_IOCOST
+#ifdef CONFIG_BLK_BIO_IOCOST
 	bio->bi_iocost_cost = 0;
 #endif
 #endif
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index fe065c394fff..495ffc29bab0 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -261,7 +261,7 @@ struct bio {
 	 */
 	struct blkcg_gq		*bi_blkg;
 	struct bio_issue	bi_issue;
-#ifdef CONFIG_BLK_CGROUP_IOCOST
+#ifdef CONFIG_BLK_BIO_IOCOST
 	u64			bi_iocost_cost;
 #endif
 #endif
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ