Solved

How to  Read write on md device thr' kernel module.

Posted on 2004-08-13
3
330 Views
Last Modified: 2010-04-20
Hi ,
   I want to write a kernel module that will perform read write operations on RAID device through md device driver.
    The solution i found is to generate read write call using ll_rw_block interface. Is this correct soln ? if yes then how should i go for it i.e. how to initialise buffer_head struct parameter etc...
     and if no please suggest what should i do ???

Kernel 2.4.20 using md device with RAID1 personality.
0
Comment
Question by:nikhildharashivkar
3 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 125 total points
ID: 11798900
If the pointers I give you don't help, then it may be worthwhile posting this in the linux programming section. I have written one tiny bit of code for a kernel module that merely verified that a file existed, and most of that code was from an example in a book!..so I'm in very murky water here.

As you are probably aware, the point of the md device driver is to remove some of the complexity relating to the device itself, so I'd persume that you'd use exactly the same approace for say a SCSI device as you would for a hardware RAID device.

This site provides some very promising looking links to the type of article that I believe you need:

http://www.linuxlinks.com/Kernel/Articles/

This article is probably what you are after as it deals specifically with RAID:

http://www.linuxjournal.com/article.php?sid=2391
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now