simple scsi device mapper module
From: Jack Wang <hidden>
Date: 2012-10-18 01:36:28
2012/10/17 Dmitry Filippov [off-list ref]:
Hi, Recently i've started with development of kernel module, which uses existing block devices/partitions as backend and represents itself as scsi disk. i've found good start point - scsi_debug module which is in official kernel tree under drivers/scsi/ i suppose you are aware about this module. So in fact it is low level scsi adapter which represents itself as scsi disk /dev/sd? on the system and uses RAM as backend storage. actually what i need!
It's a adapter, it use RAM represent as scsi disk snip..
the problem is with response to READ. scsi_debug just uses sg_copy_from_buffer from RAM storage - where data is always uptodate. but in my case i need to read data from block device by submit_bio first and only after this can use buffer updated to pass it to sg_copy_from_buffer... I still don't have idea how to accomplish this.
you just need to pass the request to block device and can scsi_done when ready, I'm not sure submit_io block or not through. Jack
_______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies