Skip to content

Commit 9d66204

Browse files
committed
[KERNEL] Fix build on Linux 6.8 and CentOS 9.5
1 parent 254a261 commit 9d66204

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/build-kernel-modules.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ jobs:
4141
build-os: ubuntu-22.04
4242
kernel-type: centos-rpm
4343
kernel-source: https://vault.centos.org/8.5.2111/BaseOS/Source/SPackages/kernel-4.18.0-348.7.1.el8_5.src.rpm
44-
- name: CentOS 9.3 [5.14.0]
45-
build-os: ubuntu-22.04
46-
kernel-type: centos-tar
47-
kernel-source: https://files.bwlp.ks.uni-freiburg.de/stuff/centos/linux-5.14.0-362.18.1.el9_3.tar.xz
4844
- name: CentOS 9.4 [5.14.0]
4945
build-os: ubuntu-22.04
5046
kernel-type: centos-tar
5147
kernel-source: https://files.bwlp.ks.uni-freiburg.de/stuff/centos/linux-5.14.0-427.el9.tar.xz
48+
- name: CentOS 9.5 [5.14.0]
49+
build-os: ubuntu-22.04
50+
kernel-type: centos-tar
51+
kernel-source: https://files.bwlp.ks.uni-freiburg.de/stuff/centos/linux-5.14.0-432.el9.tar.xz
5252
name: Build xloop ${{ matrix.config.name }}
5353
runs-on: ${{ matrix.config.build-os }}
5454
steps:

src/kernel/xloop_main_6.6.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,11 @@ static int xloop_add(int i)
18271827
}
18281828
xlo->xlo_queue = xlo->xlo_disk->queue;
18291829

1830+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
1831+
blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS_CAP);
1832+
#else
18301833
blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS);
1834+
#endif
18311835

18321836
/*
18331837
* By default, we do buffer IO, so it doesn't make sense to enable

src/kernel/xloop_main_rhel_9.0.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,11 @@ static int xloop_add(int i)
20922092
}
20932093
xlo->xlo_queue = xlo->xlo_disk->queue;
20942094

2095+
#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 5)
2096+
blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS_CAP);
2097+
#else
20952098
blk_queue_max_hw_sectors(xlo->xlo_queue, BLK_DEF_MAX_SECTORS);
2099+
#endif
20962100

20972101
/*
20982102
* By default, we do buffer IO, so it doesn't make sense to enable

0 commit comments

Comments
 (0)