Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] DRBD-filesystem interaction
@ 2006-08-24 18:25 gniv
  2006-08-25  5:57 ` [Drbd-dev] " Lars Ellenberg
  0 siblings, 1 reply; 2+ messages in thread
From: gniv @ 2006-08-24 18:25 UTC (permalink / raw)
  To: drbd-dev

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Drbd-dev] Re: DRBD-filesystem interaction
  2006-08-24 18:25 [Drbd-dev] DRBD-filesystem interaction gniv
@ 2006-08-25  5:57 ` Lars Ellenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ellenberg @ 2006-08-25  5:57 UTC (permalink / raw)
  To: drbd-dev

/ 2006-08-24 14:25:13 -0400
\ gniv@cs.umass.edu:
> 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.

> 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.

-- 
: 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 :

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-25  5:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-24 18:25 [Drbd-dev] DRBD-filesystem interaction gniv
2006-08-25  5:57 ` [Drbd-dev] " Lars Ellenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox