bugfix for block_dev_kernel/ltp_block_dev.c
PATCH 1/1 bugfix for block_dev_kernel/ltp_block_dev.c
Add genhd.h and blkdev.h to ltp_block_dev.c.
Failed at compile time on kernel 5.12 due to change of register_blkdev function definition from linux/fs.h to linux/genhd.h and failure of test case tc05,The reason is that the BLKDEV_MAJOR_MAX definition was changed from fs.h to blkdev.h
--- .../device-drivers/block/block_dev_kernel/ltp_block_dev.c | 2 ++ 1 file changed, 2 insertions(+)
testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c +2 -0
@@ -12,6 +12,8 @@#include <linux/module.h> #include <linux/device.h> #include <linux/fs.h> +#include <linux/genhd.h> +#include <linux/blkdev.h> MODULE_AUTHOR ("M?rton N?meth <[email protected]>" );MODULE_AUTHOR ("Copyright (c) 2013 Oracle and/or its affiliates" );
--
2.18.2
PATCH 1/1 bugfix for block_dev_kernel/ltp_block_dev.c
Hi,
Quoted 3 lines
Add
genhd.handblkdev.htoltp_block_dev.c.Failed at compile time on kernel 5.12 due to change of
register_blkdevfunction definition fromlinux/fs.htolinux/genhd.hand failure of test case tc05,The reason is that theBLKDEV_MAJOR_MAXdefinition was changed fromfs.htoblkdev.h
Good catch, merged with slightly changed commit message. Thanks!
Maybe we should not ignore build error for kernel module to catch these API changes earlier.
Kind regards,
Petr