Re: simple scsi device mapper module

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

 



2012/10/17 Dmitry Filippov <filippovd20@xxxxxxxxx>:
> 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@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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