[PATCH 06/17] ocfs2: Handle error during journal load

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mark Fasheh
Date: Monday, July 14, 2008 - 3:01 pm

From: Wengang Wang <wen.gang.wang@oracle.com>

This patch ensures the mount fails if the fs is unable to load the journal.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
---
 fs/ocfs2/super.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index df63ba2..ccecfe5 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1703,7 +1703,11 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)
 	local = ocfs2_mount_local(osb);
 
 	/* will play back anything left in the journal. */
-	ocfs2_journal_load(osb->journal, local);
+	status = ocfs2_journal_load(osb->journal, local);
+	if (status < 0) {
+		mlog(ML_ERROR, "ocfs2 journal load failed! %d\n", status);
+		goto finally;
+	}
 
 	if (dirty) {
 		/* recover my local alloc if we didn't unmount cleanly. */
-- 
1.5.4.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git patches] Ocfs2 and Configfs updates for 2.6.27, Mark Fasheh, (Mon Jul 14, 3:01 pm)
[PATCH 02/17] ocfs2: Instrument fs cluster locks, Mark Fasheh, (Mon Jul 14, 3:01 pm)
[PATCH 04/17] ocfs2: use simple_read_from_buffer(), Mark Fasheh, (Mon Jul 14, 3:01 pm)
[PATCH 06/17] ocfs2: Handle error during journal load, Mark Fasheh, (Mon Jul 14, 3:01 pm)
[PATCH 08/17] ocfs2: Fix CONFIG_OCFS2_DEBUG_FS #ifdefs, Mark Fasheh, (Mon Jul 14, 3:01 pm)
[PATCH 10/17] configfs: Introduce configfs_dirent_lock, Mark Fasheh, (Mon Jul 14, 3:01 pm)