Skip to contentSkip to conversation

ocfs2: Add some trace log for orphan scan.

PATCH New Tao Ma 3 participants 3 messages Jun 1, 2010 – Aug 12, 2010 OCFS2

lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 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.

---
 fs/ocfs2/journal.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/journal.c +3 -0
index 47878cf..776ab2f 100644
@@ -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;
 }
 
Signature · 1 line
1.5.5
#1 lore raw

PATCH 1/1 ocfs2: Add some trace log for orphan scan.

Quoted 33 lines · Tao Ma

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.

---
  fs/ocfs2/journal.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/journal.c +3 -0
index 47878cf..776ab2f 100644
@@ -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;
  }
 
#2 lore raw

PATCH 1/1 ocfs2: Add some trace log for orphan scan.

In reply to Tao Ma
Quoted 7 lines · Tao Ma

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.

This patch is now in the merge-window branch of ocfs2.git.

Joel

Signature · 9 lines
"The nice thing about egotists is that they don't talk about other
 people."
         - Lucille S. Harper

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127