summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-03 14:03:02 +0200
committerSimon Rettberg2024-04-03 14:03:02 +0200
commit9d66204292a4fcaa7a5b77568cdb5376ac87d3aa (patch)
tree5c5a070eb9d46ceffb007f7462c655003dea0f5a
parentgithub: Shorten job names so they don't get cut off in WebUI (diff)
downloadxloop-9d66204292a4fcaa7a5b77568cdb5376ac87d3aa.tar.gz
xloop-9d66204292a4fcaa7a5b77568cdb5376ac87d3aa.tar.xz
xloop-9d66204292a4fcaa7a5b77568cdb5376ac87d3aa.zip
[KERNEL] Fix build on Linux 6.8 and CentOS 9.5
-rw-r--r--.github/workflows/build-kernel-modules.yml8
-rw-r--r--src/kernel/xloop_main_6.6.c4
-rw-r--r--src/kernel/xloop_main_rhel_9.0.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/.github/workflows/build-kernel-modules.yml b/.github/workflows/build-kernel-modules.yml
index 811c2a0..85a54cc 100644
--- a/.github/workflows/build-kernel-modules.yml
+++ b/.github/workflows/build-kernel-modules.yml
@@ -41,14 +41,14 @@ jobs:
build-os: ubuntu-22.04
kernel-type: centos-rpm
kernel-source: https://vault.centos.org/8.5.2111/BaseOS/Source/SPackages/kernel-4.18.0-348.7.1.el8_5.src.rpm
- - name: CentOS 9.3 [5.14.0]
- build-os: ubuntu-22.04
- kernel-type: centos-tar
- kernel-source: https://files.bwlp.ks.uni-freiburg.de/stuff/centos/linux-5.14.0-362.18.1.el9_3.tar.xz
- name: CentOS 9.4 [5.14.0]
build-os: ubuntu-22.04
kernel-type: centos-tar
kernel-source: https://files.bwlp.ks.uni-freiburg.de/stuff/centos/linux-5.14.0-427.el9.tar.xz
+ - name: CentOS 9.5 [5.14.0]
+ build-os: ubuntu-22.04
+ kernel-type: centos-tar
+ kernel-source: https://files.bwlp.ks.uni-freiburg.de/stuff/centos/linux-5.14.0-432.el9.tar.xz
name: Build xloop ${{ matrix.config.name }}
runs-on: ${{ matrix.config.build-os }}
steps:
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