diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-06-29 08:06:08 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-05-09 09:10:45 -0400 |
commit | dfa8bedbfe881caf6676704ab1aae18dfe8e430a (patch) | |
tree | 416102d8cd59c6be45b072c2ce123c6cb8f63f52 /drivers/block/drbd/drbd_main.c | |
parent | 02ee8f95fadf7c94b3d28df436a095152f6392b2 (diff) |
drbd: Implemented the disk-timeout option
When the disk-timeout is active, and it expires for a single request,
we consider the local disk as D_FAILED. Note: With this change,
I made both timeout based state transitions HARD state transitions.
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_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index bc8a8a7556da..4bd636524dd1 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1404,6 +1404,9 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
1404 | /* Here we have the actions that are performed after a | 1404 | /* Here we have the actions that are performed after a |
1405 | state change. This function might sleep */ | 1405 | state change. This function might sleep */ |
1406 | 1406 | ||
1407 | if (os.disk <= D_NEGOTIATING && ns.disk > D_NEGOTIATING) | ||
1408 | mod_timer(&mdev->request_timer, jiffies + HZ); | ||
1409 | |||
1407 | nsm.i = -1; | 1410 | nsm.i = -1; |
1408 | if (ns.susp_nod) { | 1411 | if (ns.susp_nod) { |
1409 | if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) | 1412 | if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) |
@@ -3318,6 +3321,8 @@ static void drbd_delete_device(unsigned int minor) | |||
3318 | if (!mdev) | 3321 | if (!mdev) |
3319 | return; | 3322 | return; |
3320 | 3323 | ||
3324 | del_timer_sync(&mdev->request_timer); | ||
3325 | |||
3321 | /* paranoia asserts */ | 3326 | /* paranoia asserts */ |
3322 | if (mdev->open_cnt != 0) | 3327 | if (mdev->open_cnt != 0) |
3323 | dev_err(DEV, "open_cnt = %d in %s:%u", mdev->open_cnt, | 3328 | dev_err(DEV, "open_cnt = %d in %s:%u", mdev->open_cnt, |