simple scsi device mapper module
Jack Wang
xjtuwjp at gmail.com
Wed Oct 17 21:36:28 EDT 2012
2012/10/17 Dmitry Filippov <filippovd20 at gmail.com>:
> 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
More information about the Kernelnewbies
mailing list