From 3c3f20c9813391ba4004764072989744395cf405 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Tue, 1 Jun 2010 13:58:13 +0800 Subject: ocfs2: Add some trace log for orphan scan. Now orphan scan worker has no trace log, so it is very hard to tell whether it is finished or blocked. So add 2 mlog trace log so that we can tell whether the current orphan scan worker is blocked or not. It does help when I analyzed a orphan scan bug. Signed-off-by: Tao Ma Signed-off-by: Joel Becker --- fs/ocfs2/journal.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/ocfs2/journal.c') diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 9b57c0350ff..04d41dfeab9 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -1888,6 +1888,8 @@ void ocfs2_queue_orphan_scan(struct ocfs2_super *osb) os = &osb->osb_orphan_scan; + mlog(0, "Begin orphan scan\n"); + if (atomic_read(&os->os_state) == ORPHAN_SCAN_INACTIVE) goto out; @@ -1920,6 +1922,7 @@ void ocfs2_queue_orphan_scan(struct ocfs2_super *osb) unlock: ocfs2_orphan_scan_unlock(osb, seqno); out: + mlog(0, "Orphan scan completed\n"); return; } -- cgit v1.2.3-70-g09d2 From f9c57ada32ea3f2e12600cf274035fff063b2e0f Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Mon, 2 Aug 2010 11:02:13 +0800 Subject: ocfs2: Remove unused old_id in ocfs2_commit_cache. Signed-off-by: Tao Ma Signed-off-by: Joel Becker --- fs/ocfs2/journal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/ocfs2/journal.c') diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 04d41dfeab9..5787802c2d6 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -301,7 +301,6 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) { int status = 0; unsigned int flushed; - unsigned long old_id; struct ocfs2_journal *journal = NULL; mlog_entry_void(); @@ -326,7 +325,7 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) goto finally; } - old_id = ocfs2_inc_trans_id(journal); + ocfs2_inc_trans_id(journal); flushed = atomic_read(&journal->j_num_trans); atomic_set(&journal->j_num_trans, 0); -- cgit v1.2.3-70-g09d2 From 17ae521158d6fe89cfdd00a9990aa40d02e81391 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Mon, 2 Aug 2010 11:02:14 +0800 Subject: ocfs2: Remove obsolete comments before ocfs2_start_trans. Signed-off-by: Tao Ma Signed-off-by: Joel Becker --- fs/ocfs2/journal.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'fs/ocfs2/journal.c') diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 5787802c2d6..faa2303dbf0 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -341,9 +341,6 @@ finally: return status; } -/* pass it NULL and it will allocate a new handle object for you. If - * you pass it a handle however, it may still return error, in which - * case it has free'd the passed handle for you. */ handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int max_buffs) { journal_t *journal = osb->journal->j_journal; -- cgit v1.2.3-70-g09d2