Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5425fce authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds
Browse files

ocfs2: report error from o2hb_do_disk_heartbeat() to user



Report return value of o2hb_do_disk_heartbeat() as a part of ML_HEARTBEAT
message so that we know whether a heartbeat actually happened or not.
This also makes assigned but otherwise unused 'ret' variable used.

Coverity id: 1227053.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4a635a11
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1127,10 +1127,10 @@ static int o2hb_thread(void *data)
		elapsed_msec = o2hb_elapsed_msecs(&before_hb, &after_hb);
		elapsed_msec = o2hb_elapsed_msecs(&before_hb, &after_hb);


		mlog(ML_HEARTBEAT,
		mlog(ML_HEARTBEAT,
		     "start = %lu.%lu, end = %lu.%lu, msec = %u\n",
		     "start = %lu.%lu, end = %lu.%lu, msec = %u, ret = %d\n",
		     before_hb.tv_sec, (unsigned long) before_hb.tv_usec,
		     before_hb.tv_sec, (unsigned long) before_hb.tv_usec,
		     after_hb.tv_sec, (unsigned long) after_hb.tv_usec,
		     after_hb.tv_sec, (unsigned long) after_hb.tv_usec,
		     elapsed_msec);
		     elapsed_msec, ret);


		if (!kthread_should_stop() &&
		if (!kthread_should_stop() &&
		    elapsed_msec < reg->hr_timeout_ms) {
		    elapsed_msec < reg->hr_timeout_ms) {