[Drbd-dev] PATCH: Missing state change netlink events

Graham, Simon Simon.Graham at stratus.com
Sun Nov 4 22:46:47 CET 2007

 <<ava-3834.patch>> We have noticed that not all state changes are being
reported via netlink (as seen with the 'drbdsetup /dev/drbd0 events -a
-u' command) - the reason for this is that the state broadcast is done
in after_state_ch using the _current_ mdev state when it runs - it's
entirely possible for two state changes to occur in quick succession
before the after_state_ch worker runs which results in the same state
being broadcast twice - this is especially a problem if you are looking
to see disk Failed state changes as the state tends to change to Failed
and then to Diskless very quickly, which can result in the Diskless
state being reported twice.

I think the fix is simple - modify the code so that after_state_ch
broadcasts the new state rather than the current state (patch attached)
- I would have removed the passing of mdev completely from
drbd_bcast_state() if it weren't for the fact it is required by the
generated to_tags function. I'm testing this at the moment but it's a
little hard to be sure it's right since this requires fairly tight


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ava-3834.patch
Type: application/octet-stream
Size: 1581 bytes
Desc: ava-3834.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20071104/3b335acb/ava-3834.obj

More information about the drbd-dev mailing list