Skip to content

Commit 6633ca5

Browse files
biger410torvalds
authored andcommitted
ocfs2: o2hb: fix hb hung time
hr_last_timeout_start should be set as the last time where hb is still OK. When hb write timeout, hung time will be (jiffies - hr_last_timeout_start). Signed-off-by: Junxiao Bi <[email protected]> Reviewed-by: Ryan Ding <[email protected]> Reviewed-by: Mark Fasheh <[email protected]> Cc: Gang He <[email protected]> Cc: rwxybh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Joseph Qi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 88dbe98 commit 6633ca5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ocfs2/cluster/heartbeat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ static void o2hb_arm_timeout(struct o2hb_region *reg)
356356
spin_unlock(&o2hb_live_lock);
357357
}
358358
cancel_delayed_work(&reg->hr_write_timeout_work);
359-
reg->hr_last_timeout_start = jiffies;
360359
schedule_delayed_work(&reg->hr_write_timeout_work,
361360
msecs_to_jiffies(O2HB_MAX_WRITE_TIMEOUT_MS));
362361

@@ -1174,6 +1173,7 @@ static int o2hb_do_disk_heartbeat(struct o2hb_region *reg)
11741173
if (own_slot_ok) {
11751174
o2hb_set_quorum_device(reg);
11761175
o2hb_arm_timeout(reg);
1176+
reg->hr_last_timeout_start = jiffies;
11771177
}
11781178

11791179
bail:

0 commit comments

Comments
 (0)