Re: Subject: doubt regarding :Waking up the request function for Block device

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

 






Hi Pradeep,
          The question is How does the request method of a Block Device
driver get called. The reqest method is not in  blocked state,
bcoz then we would be busy  waiting in the Kernel which we dont want. So
when requests for a particular device how is the request method   invoked
(ie, using signals etc etc)
The answer lies in the "unplug" methods in linux/drivers/block/ll_rw_blk.c
but havent been able to figure that one out.

To be specific my question is how is " Then any subsequent requests are
routed to your routines directly using the
requests"

Any ideas?
Thanks
Mathew











J Pradeep <pradeep@it.iitb.ac.in> on 01/08/2002 11:08:26 AM

To:   Mathew Joseph/HSSBLR
cc:   Kernel Newbies mail-list <kernelnewbies@nl.linux.org>

Subject:  Re: post





Hi,
  Whenever there is a open on the device the operations corresponding to
your device are copied into the i-node at the VFS layer. Then any
subsequent requests are routed to your routines directly using the
requests. There is a open routine that you provide with your device that
gets called when there is a open on your device. You can do any
open-specific initializations here.

  I guess this will solve the problem.

-Pradeep


On Tue, 8 Jan 2002 mjoseph@hss.hns.com wrote:

> Subject:  doubt regarding :Waking up the request function for Block
device
>       drivers??
>
>
***************************************************************************
>
***************************************************************************
> ****
>
>
> I was going through the code in linux/drivers/block/ll_rw_blk.c
> and had a doubt which i though someone could answer
>
> In a block device , The kernel maintains a global  list of requests in
> blk_dev[MAX_BLKDEV]. The request handlers are initalized for a
> particular device by
> q->request_fn           = rfn;
>
>
> My question is how does the Kernel signal ("wake up") the appropriate
> driver that
> "now you have a request that you need to service"
>

--
-Pradeep
-----------------------------------
Let us be the change, we wish to see in this world.
                        --- Mahatma Gandhi
-----------------------------------
Pradeep Jagannath
pradeep@it.iitb.ernet.in
http://www.it.iitb.ernet.in/~pradeep

-----------------------------------





--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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