aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-12-03 10:04:24 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-03-10 05:35:18 -0500
commit09b9e7979378fe070784de20e50bb1d42aa643ab (patch)
treeb0326f36388850085d7c4c08bcb429b0ec95a913 /drivers/block
parent2561b9c1f1d63077c41903fc6ad58dc9ec47248b (diff)
drbd: Implemented the before-resync-source handler
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_worker.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index ab5cff502f5b..e201f6f82c0e 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -1499,6 +1499,20 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side)
1499 drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); 1499 drbd_force_state(mdev, NS(conn, C_DISCONNECTING));
1500 return; 1500 return;
1501 } 1501 }
1502 } else /* C_SYNC_SOURCE */ {
1503 r = drbd_khelper(mdev, "before-resync-source");
1504 r = (r >> 8) & 0xff;
1505 if (r > 0) {
1506 if (r == 3) {
1507 dev_info(DEV, "before-resync-source handler returned %d, "
1508 "ignoring. Old userland tools?", r);
1509 } else {
1510 dev_info(DEV, "before-resync-source handler returned %d, "
1511 "dropping connection.\n", r);
1512 drbd_force_state(mdev, NS(conn, C_DISCONNECTING));
1513 return;
1514 }
1515 }
1502 } 1516 }
1503 1517
1504 drbd_state_lock(mdev); 1518 drbd_state_lock(mdev);