diff options
author | Simon Rettberg | 2024-04-03 14:03:02 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-04-03 14:03:02 +0200 |
commit | 9d66204292a4fcaa7a5b77568cdb5376ac87d3aa (patch) | |
tree | 5c5a070eb9d46ceffb007f7462c655003dea0f5a /src | |
parent | github: Shorten job names so they don't get cut off in WebUI (diff) | |
download | xloop-9d66204292a4fcaa7a5b77568cdb5376ac87d3aa.tar.gz xloop-9d66204292a4fcaa7a5b77568cdb5376ac87d3aa.tar.xz xloop-9d66204292a4fcaa7a5b77568cdb5376ac87d3aa.zip |
[KERNEL] Fix build on Linux 6.8 and CentOS 9.5
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/xloop_main_6.6.c | 4 | ||||
-rw-r--r-- | src/kernel/xloop_main_rhel_9.0.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/xloop_main_6.6.c b/src/kernel/xloop_main_6.6.c index 871ce7b..d5c7f16 100644 --- a/src/kernel/xloop_main_6.6.c +++ b/src/kernel/xloop_main_6.6.c @@ -1827,7 +1827,11 @@ static int xloop_add(int i) } xlo->xlo_queue = xlo->xlo_disk->queue; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) + blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS_CAP); +#else blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS); +#endif /* * By default, we do buffer IO, so it doesn't make sense to enable diff --git a/src/kernel/xloop_main_rhel_9.0.c b/src/kernel/xloop_main_rhel_9.0.c index 0d82b79..e35284e 100644 --- a/src/kernel/xloop_main_rhel_9.0.c +++ b/src/kernel/xloop_main_rhel_9.0.c @@ -2092,7 +2092,11 @@ static int xloop_add(int i) } xlo->xlo_queue = xlo->xlo_disk->queue; +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 5) + blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS_CAP); +#else blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS); +#endif /* * By default, we do buffer IO, so it doesn't make sense to enable |