Solved

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

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JQuery serialize and unserialize 8 83
fedora linux on laptop - setup sendmail - or some kind of email 5 45
awk variable in printf 1 25
linux SFTP 8 44
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
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.

773 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