]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: don't start a resync without access to up-to-date Data
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 1 Apr 2010 14:59:32 +0000 (16:59 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 17 May 2010 23:08:18 +0000 (01:08 +0200)
commite6ef275609a845ae1353b3830f018c642f61656c
tree9cd1b789104e4570294893856b49d3fb150379b5
parent65c581b52c2e8d785344b9840a10a15223326f1c
drbd: don't start a resync without access to up-to-date Data

In case both nodes are "inconsistent", invalidate would
have started a resync anyways, without a chance to ever
succeed, just filling the logs with warning messages.

Simply disallow that state change,
re-using the SS_NO_UP_TO_DATE_DISK return value.

This also changes the corresponding error string to
"Need access to UpToDate Data" -- I found the
"Refusing to be Primary without at least one UpToDate disk"
answer misleading in some situations anyways.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_strings.c