Add support for kernel v6.9

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Robert Baldyga
2024-07-05 15:27:17 +02:00
parent 4ad71a55b6
commit d3a1ce8987
4 changed files with 46 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ check() {
elif compile_module $cur_name "bdev_open_by_path(NULL, 0, NULL, NULL);" "linux/blkdev.h"
then
echo $cur_name 3 >> $config_file_path
elif compile_module $cur_name "bdev_file_open_by_path(NULL, 0, NULL, NULL);" "linux/blkdev.h"
then
echo $cur_name 4 >> $config_file_path
else
echo $cur_name X >> $config_file_path
fi
@@ -45,6 +48,12 @@ apply() {
bdev_open_by_path(path, mode, holder, NULL)"
add_define "cas_bdev_get_from_handle(handle) \\
(handle->bdev)" ;;
"4")
add_typedef "struct file *cas_bdev_handle_t;"
add_define "cas_bdev_open_by_path(path, mode, holder) \\
bdev_file_open_by_path(path, mode, holder, NULL)"
add_define "cas_bdev_get_from_handle(handle) \\
file_bdev(handle)" ;;
*)
exit 1
esac