I'm working on Linux kernel version 2.6.39.1, and am developing a block device driver. In this regard, I want to combine multiple struct bio
s into a single struct request
, which is then added to the request_queue
for processing by the device driver, namely -- scsi_request_fn()
.
I tried using the ->bi_next
field of struct bio
to link multiple struct bio
s that I have composed, thereby creating a linked list of struct bio
s. When I call submit_bio()
to submit a bio to the block device layer for I/O, this BUG_ON()
is triggered because the code expects bio->bi_next
to be NULL
.
Is there a way to link several struct bio
s into a single struct request
before sending it to lower layers for servicing?