Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-13
3
Medium Priority
?
341 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 500 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In this post we will learn different types of Android Layout and some basics of an Android App.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

963 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