lkml.org 
[lkml]   [2022]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 2/3] block: add a helper to check elevator name
Date
From: Yu Kuai <yukuai3@huawei.com>

The helper will be used in later patch to make sure wbt is not enabled
if default io scheduler is bfq.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
block/elevator.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/block/elevator.h b/block/elevator.h
index 3f0593b3bf9d..ccded343cf27 100644
--- a/block/elevator.h
+++ b/block/elevator.h
@@ -104,6 +104,11 @@ struct elevator_queue
DECLARE_HASHTABLE(hash, ELV_HASH_BITS);
};

+static inline bool check_elevator_name(struct elevator_queue *elevator,
+ const char *name)
+{
+ return !strcmp(elevator->type->elevator_name, name);
+}
/*
* block elevator interface
*/
--
2.31.1
\
 
 \ /
  Last update: 2022-09-19 03:40    [W:0.103 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site