LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-27-2011, 08:54 PM   #1
alex_ren
LQ Newbie
 
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
Does sd card driver support the processing of single request (bio) or the queue


I am writing a simple file system for SD card (quite ambitious for a beginner of kernel programming). Since I am dealing with flash memory, I don't want the block layer to reorganize the ordering of my r/w request to block device driver.

I read "Understanding Linux Kernel" and "Linux Device Driver" for related information. They mentioned that the block device driver can support the direct processing of bio (instead of request_queue_t) by providing the function of type "typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);")

According to my understanding, a block device driver can choose to support the processing of either request_queue_t or bio. But cannot support both. On the other hand, when my file system module issues a request for r/w, it has no idea and it cannot control whether its request will be put into the queue by the block layer. Is my understanding correct?

Here comes my question. Nowadays, Linux supports SD card quite well. How can I know whether the corresponding device driver supports the process of request_queue_t or just a bio. Must I look at the code of the sd card device driver? If I must, where does the driver locate in the kernel source tree. Thanks.
 
Old 10-27-2011, 11:24 PM   #2
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
look at drivers/mmc/card/block.c

that obviously uses the request que

drivers/mmc/host/sdhci.c looks the same way

it might depend on if the thing is usb or not

you just need to find out exactly which driver your device is using and then read it
the drivers are small and simple.

you can also just write a new driver for your device if you want to expose something different.

remember to keep a fire extinguisher handy !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Exim not processing the queue spark Linux - Server 1 04-12-2010 03:37 PM
Sendmail queue not processing Sargalus Linux - Software 14 04-07-2010 12:57 PM
domain based mail queue processing sunethj Linux - Server 2 05-08-2008 08:34 PM
graphics card with pci and linux driver support srinivas.chilaka LinuxQuestions.org Member Intro 1 09-22-2006 03:31 AM
multithreaded server using single message queue ekern Programming 0 11-19-2004 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration