In Block Device Drivers coding, I am trying to implement Disk on file code, I am getting error:
In function ‘mydisk_request’:
/home/lab/DD/main.c:223:20: error: too few arguments to function ‘blk_get_request’
while ((req = blk_get_request(queue)) != NULL)
^~~~~~~~~~~~~~~
In file included from /home/lab/DD/main.c:5:0:
./include/linux/blkdev.h:854:24: note: declared here
extern struct request *blk_get_request(struct request_queue *, unsigned int op,
^~~~~~~~~~~~~~~
/home/lab/DD/main.c:228:9: error: implicit declaration of function ‘__blk_end_request_all’; did you mean ‘blk_get_request’? [-Werror=implicit-function-declaration]
__blk_end_request_all(req,ret);
^~~~~~~~~~~~~~~~~~~~~
blk_get_request
/home/lab/DD/main.c: In function ‘mydisk_init’:
/home/lab/DD/main.c:266:24: error: implicit declaration of function ‘blk_init_queue’; did you mean ‘blk_put_queue’? [-Werror=implicit-function-declaration]
mydisk_dev.queue = blk_init_queue(mydisk_request, &mydisk_dev.lock);
^~~~~~~~~~~~~~
blk_put_queue
/home/lab/DD/main.c:266:22: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
mydisk_dev.queue = blk_init_queue(mydisk_request, &mydisk_dev.lock);
^
Can anyone pls. help me with this?
I think its asking me to replace blk_get_request(queue) function with blk_get_request and blk_init_queue(mydisk_request, &mydisk_dev.lock); function with blk_put_queue respectively. But once I am replacing I am getting the error that too few arguments for those functions.