From: xjtuwjp@gmail.com (Jack Wang)
To: kernelnewbies@lists.kernelnewbies.org
Subject: scsi subsystem in linux
Date: Tue, 05 Nov 2013 13:09:01 +0100 [thread overview]
Message-ID: <5278DFDD.4050508@gmail.com> (raw)
In-Reply-To: <CAL+pkpebp86C6+2-ehz0c7AvCiQi+1a03aUqxKCzL07VYZO7fw@mail.gmail.com>
Hi Nidhi,
About the function call trace you can use ftrace to find out, another
useful tool is scsi_logging_level to set more verbose logging output for
scsi core.
Regards
Jack
On 11/05/2013 12:48 PM, nidhi mittal hada wrote:
>
> Hi All
>
> i have got a requirement where I need to encrypt/decrypt data that goes
> from scsi layer to a particular block device.
> As per my understanding till now on scsi subsystem in linux, i think i
> need to
> use crypto api and call appropriate encrypt/decrypt function from sd
> driver for block device.
>
> I need to locate that specific function where this change needs to be
> made ...
> I know basic block device driver writing in linux .. But not able to fit
> scsi in this picture.
>
> I have few basic doubts.. kindly help in resolving ...
>
> 1) Now, as example block device driver sbull, as given LDD, works on
> request queue, fetches req from this queue, using function req =
> elv_next_request(q)),
> in request function.
> what is corresponding function in sd layer ?
> That is the function where i have req->buffer in hand with me..
>
>
> 2) For a write operation from initiator to disk
> is the hierarchy like this
> *sd_prep_fn*
> generic block device request structure -> converted into scsi specific
> request structure
> OR
> what is scsi_prep_fn for??
>
> 3)How is Scpnt pointer that is req-> special is used in sd_prep_func..
> is processed? i mean which layer picks Scpnt up and processes ??
>
> 4)Any document any URL any kind of instruction will be extremely helpful.
>
> 5)Whenever a *new scsi device is attached *sd_probe is called
> sd_async_probe() is the async part of sd_probe() So when this is called
> the prep_fn is set to sd_prep_fn and hence this will be called.
>
> *But i thought sd_prep_fn should be called for each and every request
> .....??*
> Kindly help me to clear the confusion ..
>
>
> Thanks
> Nidhi
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
next prev parent reply other threads:[~2013-11-05 12:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 11:48 scsi subsystem in linux nidhi mittal hada
2013-11-05 12:09 ` Jack Wang [this message]
2013-11-05 12:43 ` nidhi mittal hada
2013-11-05 13:04 ` nidhi mittal hada
2013-11-05 16:19 ` nidhi mittal hada
2013-11-06 9:55 ` Jack Wang
2013-11-07 8:54 ` piyush moghe
-- strict thread matches above, loose matches on Subject: below --
2013-11-08 8:53 pmkernel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5278DFDD.4050508@gmail.com \
--to=xjtuwjp@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).