summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-03-04 15:11:39 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-03-11 16:12:35 +0100
commitd10a33c68b8526d95ef6ee72b371c392d48df4d3 (patch)
tree6de16649b490195c231df3741293f6849006e6e7 /drivers
parentd0c3f60f3611ceac9b1e4fdffd1497337568e7cb (diff)
downloadlinux-d10a33c68b8526d95ef6ee72b371c392d48df4d3.tar.gz
linux-d10a33c68b8526d95ef6ee72b371c392d48df4d3.tar.bz2
linux-d10a33c68b8526d95ef6ee72b371c392d48df4d3.zip
drbd: Forcing primary should also work for Consistent disks [Bugz 266]
Up to now this only worked for Outdated and Inconsistent disks, that it did not worked for Consistent disks was an inconsistent omission. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_nl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d53d36cd0e57..6492e321ec00 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -285,8 +285,8 @@ int drbd_set_role(struct drbd_conf *mdev, enum drbd_role new_role, int force)
}
if (r == SS_NO_UP_TO_DATE_DISK && force &&
- (mdev->state.disk == D_INCONSISTENT ||
- mdev->state.disk == D_OUTDATED)) {
+ (mdev->state.disk < D_UP_TO_DATE &&
+ mdev->state.disk >= D_INCONSISTENT)) {
mask.disk = D_MASK;
val.disk = D_UP_TO_DATE;
forced = 1;