Access block level storage via kernel

Posted by N 1.1 on Stack Overflow See other posts from Stack Overflow or by N 1.1
Published on 2010-04-24T06:15:43Z Indexed on 2010/04/24 6:23 UTC
Read the original article Hit count: 332

How to access block level storage via the kernel (w/o using scsi libraries)?

My intent is to implement a block level storage protocol over network for learning purpose, almost the same way SCSI works. Requests will be generated by initiator and sent to target (both userspace program) which makes call to kernel module and returns the data using TCP protocol to initiator.

So far, I have managed to build a simple "Hello" module and run it (I am new at kernel programming), but unable to proceed with block access.

After searching a lot, I found struct buffer_head * bread(int dev,int block) in linux/fs.h, but the compiler throws error.

error: implicit declaration of function ‘bread’

Please help, also feel free to advice on starting with kernel programming.
Thank you!

© Stack Overflow or respective owner

Related posts about c

    Related posts about linux-kernel