Duplication of the BIO structure or a request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
I am working on a small driver that uses a "make_request" function. Whenever my module receives a request from the upper layer, I am trying to copy it before sending it to the actual block device.


However, I don't see any funtion that lets me duplicate the BIO structure and its data (or a request).I have tried to increment the references to the original BIO structure, but once I modify its bi_bdev field and return nonzero (in order to be dispatched to the other device's driver) the upper layers seem to delete the data or the structure and when I try to process it a few milliseconds later I got a wonderful kernel error:

Apr 5 00:43:16 ajo kernel: kernel BUG at drivers/block/ll_rw_blk.c:2299!

Is there any way I can duplicate a BIO that is sent to me? Or at least prevent it from being deleter until I use it again? Any help would be appreciated. I have looked at the RAID source code but I can't find anything useful

Thanks

Pablo

PS: In 2.4 it was very easy.. that's why I'm a bit upset :)


-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux