diff options
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r-- | fs/ocfs2/journal.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 03ea9314fecd..4b0c68849b36 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kthread.h> | 30 | #include <linux/kthread.h> |
31 | #include <linux/time.h> | 31 | #include <linux/time.h> |
32 | #include <linux/random.h> | 32 | #include <linux/random.h> |
33 | #include <linux/delay.h> | ||
33 | 34 | ||
34 | #include <cluster/masklog.h> | 35 | #include <cluster/masklog.h> |
35 | 36 | ||
@@ -2185,8 +2186,20 @@ static int ocfs2_commit_thread(void *arg) | |||
2185 | || kthread_should_stop()); | 2186 | || kthread_should_stop()); |
2186 | 2187 | ||
2187 | status = ocfs2_commit_cache(osb); | 2188 | status = ocfs2_commit_cache(osb); |
2188 | if (status < 0) | 2189 | if (status < 0) { |
2189 | mlog_errno(status); | 2190 | static unsigned long abort_warn_time; |
2191 | |||
2192 | /* Warn about this once per minute */ | ||
2193 | if (printk_timed_ratelimit(&abort_warn_time, 60*HZ)) | ||
2194 | mlog(ML_ERROR, "status = %d, journal is " | ||
2195 | "already aborted.\n", status); | ||
2196 | /* | ||
2197 | * After ocfs2_commit_cache() fails, j_num_trans has a | ||
2198 | * non-zero value. Sleep here to avoid a busy-wait | ||
2199 | * loop. | ||
2200 | */ | ||
2201 | msleep_interruptible(1000); | ||
2202 | } | ||
2190 | 2203 | ||
2191 | if (kthread_should_stop() && atomic_read(&journal->j_num_trans)){ | 2204 | if (kthread_should_stop() && atomic_read(&journal->j_num_trans)){ |
2192 | mlog(ML_KTHREAD, | 2205 | mlog(ML_KTHREAD, |