You don't say why you need this. I recommend that you
simply don't use a filesystem - use a partition like
/dev/hda5 without a filesystem and read/write diskblocks
to and from it.
Without a filesystem you decide what data goes in what disk block,
and of course no fs cache gets in the way.
Transfering data between a range of blocks on a partition
and a ordinary file is easy - use the dd command.
file->partition
dd if=yourfile of=/dev/hdaX bs=4096 seek=<number of first block you want
to use>
partition->file
dd if=/dev/hdaX of=yourfile bs=4096 skip=<number of first disk block you
want copied> count=<total number of blocks>
Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/