[Drbd-dev] [PATCH] Proposed fix to 8.0.x to ALWAYS schedule afterstate processing

Graham, Simon Simon.Graham at stratus.com
Mon Dec 10 03:05:10 CET 2007


> As you may recall, I ran into a problem recently with some state
> changes
> being delivered via netlink out of order because some state changes do
> not get their after-state-change processing deferred to the worker
> thread - this is a big problem if you have code trying to track the
> state changes via the netlink mechanism. The suggested solution was to
> make the change to schedule ALL after state change processing to the
> worker thread and the attached patch does this, including the
> following:

We have found one issue with this patch -- we are now seeing occasional
messages:

BUG! md_sync_timer expired! Worker calls drbd_md_sync()

I _think_ this is because the meta data can be marked dirty in the after
state change processing and we now have some situations where this
happens after the code runs that writes the meta data -- I'm not sure
how terrible it is, but I think we should move the code that marks the
meta data dirty into _drbd_set_state() so it happens inline -- I don't
see any reason why it has to be done in the worker thread... what do you
think?

Simon


More information about the drbd-dev mailing list