[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessing a block device in kernel space..
i think there is an example of what you are trying to achieve on
http://lwn.net/Articles/driver-porting/, scroll down and look for the
section titled 'block devices'
hth
anupam
On Mon, 30 Aug 2004 14:01:42 -0700 (PDT), Ahmed A <ahmedcali@xxxxxxxxx> wrote:
>
> Hello,
>
> I am writing a kernel module that will send read/write
> requests to block device. If I have the name of the
> block device (e.g /dev/sda), then:
>
> 1. How do I find the "request_queue" of the block
> device to pass to __make_request.
>
> 2. My understanding is that once I have the
> request_queue, all I need to do is call __make_request
> to have the block device complete the operation. Is
> this accurate?
>
> 3. Do I need to do any sort of reservation/locking of
> the block device before I access it (send it
> commands).
>
> Thank you in advance,
> Ahmed.
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
>
>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/