Re: set blksize of block device

From: Todd Poynor
Date: Thu Oct 28 2004 - 16:58:02 EST


Lei Yang wrote:
Denis Vlasenko wrote:
...
Can you use read, write and seek system calls?
...
Not really, as I've explained, I want to do all these stuff in kernel space. More specifically, I want to write a newbie kernel module. In this module, I'll do something with a raw block device (with no filesystem). For example, I want to do block I/O operations on ramdisk, and I want to set the block size of ramdisk to whatever value I want (power of 2 of course).

Pick up a copy of Linux Device Drivers by Rubini & Corbet (O'Reilly, 2001) and start with the example ramdisk block driver in chapter 12.

--
Todd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/