Skip to contentSkip to conversation

DRBD-filesystem interaction

Drbd-dev [email protected] 2 participants 2 messages Aug 24, 2006 – Aug 25, 2006 DRBD driver

lore
Share & tools
lore
#0 lore raw

Hi,

I am a student who is looking to understand how DRBD interacts with the file system for a project. I have looked through the code, but could use some help (maybe a basic overview) figuring out the flow of operations from the time the operating system opens a file and writes to it, to DRBD performing replication; i.e. how DRBD listens to/intercepts system calls.
I understand what happens after DRBD gets the request, just looking for the parts before that time.

Thanks,
Gal

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

maintainer
#1 lore raw

/ 2006-08-24 14:25:13 -0400
\ [email protected]:

Quoted 4 lines

Hi,

I am a student who is looking to understand how DRBD interacts with the file system for a project.

it does not. the file system interacts with us...
we are a block device, we don't know nothing about file systems. "something" submits a block request (generic_make_request, submit_bio and the like in the generic kernel code), which ends up in drbd_make_request_*, where we do the housekeeping and send the data to our peer, and submit it locally to the layers below us and so on.

but we don't care at all about what is being written,
and whether it is a file system or anything else that is writing to us.

Quoted 4 lines

I have looked through the code, but could use some help (maybe a basic overview) figuring out the flow of operations from the time the operating system opens a file and writes to it, to DRBD performing replication; i.e. how DRBD listens to/intercepts system calls.

it does not.
we are a block device driver, we register as such (register_blkdev). any block device has a request queue, and we register our custom make_request_fn on it: blk_queue_make_request(q, drbd_make_request_26);

that is all there is to it to get requests delivered to us.

Signature · 3 lines
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :