summaryrefslogtreecommitdiffstats
path: root/src/kernel/dnbd3.h
diff options
context:
space:
mode:
authorManuel Bentele2020-08-27 11:02:30 +0200
committerManuel Bentele2020-08-27 11:02:30 +0200
commit47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be (patch)
tree55ce28fa6fc8c36b09ac62cec87587c1d987966e /src/kernel/dnbd3.h
parentcmake: Fixed missing include paths to build the Linux kernel module (diff)
downloaddnbd3-47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be.tar.gz
dnbd3-47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be.tar.xz
dnbd3-47c8cb8c78fbace1e5edb2107fc1c4dcbe7058be.zip
[KERNEL] convert to blk-mq and ktime
This converts the dnbd3 kernel module driver to use the blk-mq infrastructure, which allows the dnbd3 kernel module driver to be compatible with Linux kernels in version 5.x or later. The conversion of the implementation uses one hardware queue to preserve the existing send/receive and load-balancing logic, but can be scaled up in the future. In addition to that, time measurements in the implementation are converted to ktime based accessors to replace the use of deprecated time interfaces.
Diffstat (limited to 'src/kernel/dnbd3.h')
-rw-r--r--src/kernel/dnbd3.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kernel/dnbd3.h b/src/kernel/dnbd3.h
index f8af69f..aceb853 100644
--- a/src/kernel/dnbd3.h
+++ b/src/kernel/dnbd3.h
@@ -25,6 +25,7 @@
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/blkdev.h>
+#include <linux/blk-mq.h>
#include <net/sock.h>
#define KERNEL_MODULE
@@ -46,6 +47,8 @@ typedef struct
{
// block
struct gendisk *disk;
+ struct blk_mq_tag_set tag_set;
+ struct request_queue *queue;
spinlock_t blk_lock;
// sysfs