Solved

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

Posted on 2004-08-13
3
329 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

12 Experts available now in Live!

Get 1:1 Help Now