scst: Add RHEL 8.10 and 9.6 kernel support

Add compatibility for RHEL 8.10 and RHEL 9.6 kernels. Update nightly build
and regression test configs, and adjust version checks in the codebase
to handle changes in these new RHEL kernel releases.
This commit is contained in:
Gleb Chesnokov
2025-05-26 16:17:46 +03:00
parent ac41d325f3
commit 44bd290fea
6 changed files with 28 additions and 11 deletions

View File

@@ -35,12 +35,14 @@ jobs:
'4.9.337',
'3.18.140',
'3.10.108',
'5.14.0-570.12.1.el9_6^AlmaLinux^9.6',
'5.14.0-503.40.1.el9_5^AlmaLinux^9.5',
'5.14.0-427.42.1.el9_4^AlmaLinux^9.4',
'5.14.0-362.24.1.el9_3^AlmaLinux^9.3',
'5.14.0-284.30.1.el9_2^AlmaLinux^9.2',
'5.14.0-162.23.1.el9_1^AlmaLinux^9.1',
'5.14.0-70.30.1.el9_0^AlmaLinux^9.0',
'4.18.0-553.53.1.el8_10^AlmaLinux^8.10',
'4.18.0-513.24.1.el8_9^AlmaLinux^8.9',
'4.18.0-477.13.1.el8_8^AlmaLinux^8.8',
'4.18.0-425.19.2.el8_7^AlmaLinux^8.7',

View File

@@ -70,12 +70,14 @@ ABT_KERNELS=" \
3.12.74-nc \
3.11.10-nc \
3.10.108-nc \
5.14.0-570.12.1.el9_6^AlmaLinux^9.6-nc \
5.14.0-503.40.1.el9_5^AlmaLinux^9.5-nc \
5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \
5.14.0-362.24.1.el9_3^AlmaLinux^9.3-nc \
5.14.0-284.30.1.el9_2^AlmaLinux^9.2-nc \
5.14.0-162.23.1.el9_1^AlmaLinux^9.1-nc \
5.14.0-70.30.1.el9_0^AlmaLinux^9.0-nc \
4.18.0-553.53.1.el8_10^AlmaLinux^8.10-nc \
4.18.0-513.24.1.el8_9^AlmaLinux^8.9-nc \
4.18.0-477.13.1.el8_8^AlmaLinux^8.8-nc \
4.18.0-425.19.2.el8_7^AlmaLinux^8.7-nc \

View File

@@ -689,7 +689,9 @@ static inline u32 int_sqrt64(u64 x)
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6))
static inline long get_user_pages_backport(unsigned long start,
unsigned long nr_pages,
unsigned int gup_flags,

View File

@@ -968,7 +968,9 @@ static int vdisk_init_block_integrity(struct scst_vdisk_dev *virt_dev)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
bi_profile_name = bi->name;
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6))
bi_profile_name = bi->profile->name;
#else
bi_profile_name = blk_integrity_profile_name(bi);

View File

@@ -8401,8 +8401,9 @@ scst_free_bio(struct bio *bio)
#endif
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) || \
(defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) || \
(defined(CONFIG_SUSE_KERNEL) && \
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
static struct request *blk_make_request(struct request_queue *q,
struct bio *bio,
gfp_t gfp_mask)
@@ -8450,7 +8451,9 @@ static struct request *blk_make_request(struct request_queue *q,
static inline unsigned int
queue_dma_pad_mask(const struct request_queue *q)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6))
return q->dma_pad_mask;
#else
return q->limits.dma_pad_mask;
@@ -15365,14 +15368,16 @@ out_unlock:
void scst_vfs_unlink_and_put(struct path *path)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && \
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) && \
(!defined(CONFIG_SUSE_KERNEL) || \
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && \
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) && \
(!defined(CONFIG_SUSE_KERNEL) || \
LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0))
vfs_unlink(path->dentry->d_parent->d_inode, path->dentry);
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)
vfs_unlink(path->dentry->d_parent->d_inode, path->dentry, NULL);
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6))
vfs_unlink(&init_user_ns, path->dentry->d_parent->d_inode, path->dentry,
NULL);
#else

View File

@@ -1032,7 +1032,9 @@ out:
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6))
static int scst_local_slave_alloc(struct scsi_device *sdev)
{
struct request_queue *q = sdev->request_queue;
@@ -1378,7 +1380,9 @@ static const struct scsi_host_template scst_lcl_ini_driver_template = {
.name = SCST_LOCAL_NAME,
.queuecommand = scst_local_queuecommand,
.change_queue_depth = scst_local_change_queue_depth,
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6))
.slave_alloc = scst_local_slave_alloc,
#else
.dma_alignment = (4096 - 1),