Skip to content

Need to rewrite according to the new blk-mq API for kernel 5.x+. #15

@rgolubtsov

Description

@rgolubtsov

Building against the kernel 5.x fails with the following (tried under Ubuntu Focal):

$ make
...
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-88-generic'
...
/home/<vmusername>/virtblkiosim/src/virtblkiosim.c:408:19: error: implicit declaration of function ‘blk_fetch_request’; did you mean ‘blk_get_request’? [-Werror=implicit-function-declaration]
  408 |     while ((req = blk_fetch_request(viosim_req_qu)) != NULL) {
      |                   ^~~~~~~~~~~~~~~~~
      |                   blk_get_request
...
/home/<vmusername>/virtblkiosim/src/virtblkiosim.c:415:9: error: implicit declaration of function ‘__blk_end_request_all’ [-Werror=implicit-function-declaration]
  415 |         __blk_end_request_all(req, ret);
      |         ^~~~~~~~~~~~~~~~~~~~~
...
/home/<vmusername>/virtblkiosim/src/virtblkiosim.c:737:21: error: implicit declaration of function ‘blk_init_queue’; did you mean ‘blk_put_queue’? [-Werror=implicit-function-declaration]
  737 |     viosim_req_qu = blk_init_queue((request_fn_proc *) viosim_req_proc,
      |                     ^~~~~~~~~~~~~~
      |                     blk_put_queue
...
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-88-generic'
...

This is because of the new blk-mq API was introduced and some unnecessary functions have gone, see for ref.:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions