stacked bdev driver, howto? locking of lower level block device

From: Lars Ellenberg (
Date: Mon Aug 05 2002 - 15:16:52 EST

Hi there, I'm new on this list.

I do some happy hacking with drbd, which is "distributed replicated
block device", a stacked block device driver by Phillipp Reisner,
aiming towards network raid, GFS, this stuff.

I'd like to implement some kind of locking of the lower level
block device, so nobody can mount it/modify it underneath the drbd

I know drivers/md/md.c does this somehow. I tried to understand
and adapt, but it does not work.

Hopefully my questions are trivial to some of you. Please put me
on the right track.

- How does block device locking work?
- In which mode do I have to open it?
- Which flags have to be set?
- What else am I missing?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:28 EST