[Drbd-dev] [PATCH] Proposed fix to 8.0.x to ALWAYS schedule after
state processing
Graham, Simon
Simon.Graham at stratus.com
Sun Dec 9 22:48:06 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:
1. I did away with the ScheduleAfter flag
2. I moved the code that starts the worker thread from after_state_ch to
_drbd_set_state.
This is required otherwise the worker never gets started! I was a bit
nervous about
doing this but currently any place that does this actually runs the
after_state_ch
routine inline, so it must be OK to start a thread in that context.
3. I made after_state_ch private to drbd_main.c
4. Not strictly necessary, but I did away with drbd_request_state which
only added the
verbose flag; this was necessitated by the way I prototyped the
change - feel free to
not take this part of the change ;-)
Simon
PS: This patch is against 8.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd-sched.patch
Type: application/octet-stream
Size: 16928 bytes
Desc: drbd-sched.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20071209/0bfaa4a0/drbd-sched.obj
More information about the drbd-dev
mailing list