aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_worker.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-03-28 09:40:12 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:45:03 -0500
commit78bae59b1b7bc06c84e292e9ecf42c013723e057 (patch)
tree1deebbe72eab1b40c6b61f41c369c38e29fa816f /drivers/block/drbd/drbd_worker.c
parente15766e9c94f7fa3396eff4ffbbf30dea8c0e22a (diff)
drbd: Introduced drbd_read_state()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r--drivers/block/drbd/drbd_worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index ab73aa2fb4ee..7350466ff30c 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -781,7 +781,7 @@ int drbd_resync_finished(struct drbd_conf *mdev)
781 ping_peer(mdev); 781 ping_peer(mdev);
782 782
783 spin_lock_irq(&mdev->tconn->req_lock); 783 spin_lock_irq(&mdev->tconn->req_lock);
784 os = mdev->state; 784 os = drbd_read_state(mdev);
785 785
786 verify_done = (os.conn == C_VERIFY_S || os.conn == C_VERIFY_T); 786 verify_done = (os.conn == C_VERIFY_S || os.conn == C_VERIFY_T);
787 787
@@ -1546,7 +1546,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side)
1546 } 1546 }
1547 1547
1548 write_lock_irq(&global_state_lock); 1548 write_lock_irq(&global_state_lock);
1549 ns = mdev->state; 1549 ns = drbd_read_state(mdev);
1550 1550
1551 ns.aftr_isp = !_drbd_may_sync_now(mdev); 1551 ns.aftr_isp = !_drbd_may_sync_now(mdev);
1552 1552
@@ -1558,7 +1558,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side)
1558 ns.pdsk = D_INCONSISTENT; 1558 ns.pdsk = D_INCONSISTENT;
1559 1559
1560 r = __drbd_set_state(mdev, ns, CS_VERBOSE, NULL); 1560 r = __drbd_set_state(mdev, ns, CS_VERBOSE, NULL);
1561 ns = mdev->state; 1561 ns = drbd_read_state(mdev);
1562 1562
1563 if (ns.conn < C_CONNECTED) 1563 if (ns.conn < C_CONNECTED)
1564 r = SS_UNKNOWN_ERROR; 1564 r = SS_UNKNOWN_ERROR;