drbd: Fix disconnect to keep the peer disk state if connection breaks during operation
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 27 Mar 2013 13:08:40 +0000 (14:08 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 Mar 2013 16:10:25 +0000 (10:10 -0600)
commit2bd5ed5d6713594eb2b4d234d01217d506279c7d
treeafdeb5ec00f0103f8bb43fea389e3cb18ee958c3
parentbb45185de2e90af63a7bc48855de6f870cc216fc
drbd: Fix disconnect to keep the peer disk state if connection breaks during operation

The issue was that if the connection broke while we did the
gracefull state change to C_DISCONNECTING (C_TEARDOWN), then
we returned a success code from the state engine. (SS_CW_NO_NEED)

The result of that is that we missed to call the fence-peer
script in such a case.

Fixed that by introducing a new error code (SS_OUTDATE_WO_CONN).
This one should never reach back into user space.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_nl.c
drivers/block/drbd/drbd_state.c
drivers/block/drbd/drbd_strings.c
include/linux/drbd.h