From: Philipp Reisner Date: Mon, 14 Mar 2011 10:54:47 +0000 (+0100) Subject: drbd: Only downgrade the disk state in case of disk failures X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d2e17807e3799bae24664a92f4d2d3dade021e00;p=deliverable%2Flinux.git drbd: Only downgrade the disk state in case of disk failures Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 2c38752ca8d6..5c994739d11e 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -1827,7 +1827,8 @@ static inline void __drbd_chk_io_error_(struct drbd_conf *mdev, int forcedetach, if (!forcedetach) { if (__ratelimit(&drbd_ratelimit_state)) dev_err(DEV, "Local IO failed in %s.\n", where); - _drbd_set_state(_NS(mdev, disk, D_INCONSISTENT), CS_HARD, NULL); + if (mdev->state.disk > D_INCONSISTENT) + _drbd_set_state(_NS(mdev, disk, D_INCONSISTENT), CS_HARD, NULL); break; } /* NOTE fall through to detach case if forcedetach set */