@@ -2315,6 +2315,24 @@ static int ocfs2_commit_thread(void *arg)
"commit_thread: %u transactions pending on "
"shutdown\n",
atomic_read(&journal->j_num_trans));
+
+ if (status < 0) {
+ mlog(ML_ERROR, "journal is already abort
and cannot be "
+ "flushed any more. So ignore
the pending "
+ "transactions to avoid blocking
ocfs2 unmount.\n");
+ /*
+ * This may a litte hacky, however, no
chance
+ * for ocfs2/journal to decrease this
variable
+ * thourgh commit-thread. I have to do so to
+ * avoid umount hang after journal flushing
+ * failure. Since jounral has been
marked ABORT
+ * within jbd2_journal_flush, commit
cache will
+ * never do any real work to flush
journal to