Solved

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

Posted on 2004-08-13
3
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

630 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