File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ struct request;
16
16
#include <linux/sched.h>
17
17
#include <linux/sched/task.h>
18
18
19
+ #if LINUX_VERSION_CODE > KERNEL_VERSION (5 , 15 , 0 )
20
+ #include <linux/backing-dev-defs.h>
21
+ #endif
22
+
19
23
#include "ioem.h"
20
24
#include "comp.h"
21
25
@@ -524,7 +528,9 @@ static int ioem_mq_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
524
528
ioem_data_init (id , ioem_mq_timer , hctx -> queue -> elevator -> elevator_data );
525
529
id -> hctx = hctx ;
526
530
527
- #if LINUX_VERSION_CODE > KERNEL_VERSION (4 , 0 , 0 )
531
+ #if LINUX_VERSION_CODE > KERNEL_VERSION (5 , 15 , 0 )
532
+ id -> device = hctx -> queue -> disk -> bdi -> dev -> devt ;
533
+ #elif LINUX_VERSION_CODE > KERNEL_VERSION (4 , 0 , 0 )
528
534
id -> device = hctx -> queue -> backing_dev_info -> dev -> devt ;
529
535
#else
530
536
id -> device = hctx -> queue -> backing_dev_info .dev -> devt ;
@@ -1187,4 +1193,4 @@ static void ioem_data_sync_with_injections(struct ioem_data* data)
1187
1193
1188
1194
read_unlock (& ioem_injections .lock );
1189
1195
}
1190
- }
1196
+ }
You can’t perform that action at this time.
0 commit comments