How to access block-devices from kernel-space?

Clemens Eisserer <[email protected]> Thu, 5 Mar 2015 13:07:58 +0100
Newsgroups org.kernel.vger.linux-newbie
Message-ID <CAFvQSYRs31dBD2G-A-BPSmtsdRe2qw3u8Cj-D7u0okzuV6huKg@mail.gmail.com>
Hi,

I am currently working on a block-device driver which implements a
logical block device on top of a real block device.
There are several examples showing how to write a block device driver
and that seems straight-forward, however accessing the backing block
device is causing me headache.
I found the bio API to be quite complex for what I am trying to do -
the old "buffer-head" API on the other hand seems to be almost
undocumented.

Is there another/simpler way to read/write block-devices in a
synchronous manner?
What I am looking is something like the read/write syscall
functionality, however I would like to avoid using the syscall-code
for overhead reasons.

Thank you in advance, Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs