diff options
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 |