Skip to contentSkip to conversation

ocfs2/trivial: Add default mask log for heartbeat.c

PATCH New Tao Ma 2 participants 5 messages Dec 21, 2009 – Dec 22, 2009 OCFS2

lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 ocfs2/trivial: Add default mask log for heartbeat.c

I just noticed today that we have no default mask prefix for fs/ocfs2/cluster/heartbeat.c, but we have 2 places that use "mlog(0,...)". So add the default prefix so that these "mlog(0, ...)" can work.

---
 fs/ocfs2/cluster/heartbeat.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/cluster/heartbeat.c +1 -0
index c452d11..edec9bf 100644
@@ -40,6 +40,7 @@
 #include "nodemanager.h"
 #include "quorum.h"
 
+#define MLOG_MASK_PREFIX ML_HEARTBEAT
 #include "masklog.h"
 
 
Signature · 1 line
1.5.5
#1 lore raw

PATCH 1/1 ocfs2/trivial: Add default mask log for heartbeat.c

Maybe better if we changed the two mlog(0,... to mlog(ML_HEARTBEAT,...

Now I don't know why we don't have a default mask in that file but instead have distinct mlogs for HEARTBEAT and HB_BIO. One reason could have been to limit the logging of hb_bio. If that is correct, then adding a default mask will defeat the purpose.

Quoted 23 lines · Tao Ma

I just noticed today that we have no default mask prefix for fs/ocfs2/cluster/heartbeat.c, but we have 2 places that use "mlog(0,...)". So add the default prefix so that these "mlog(0, ...)" can work.

---
 fs/ocfs2/cluster/heartbeat.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/cluster/heartbeat.c +1 -0
index c452d11..edec9bf 100644
@@ -40,6 +40,7 @@
 #include "nodemanager.h"
 #include "quorum.h"
 
+#define MLOG_MASK_PREFIX ML_HEARTBEAT
 #include "masklog.h"
 
 
author
#2 lore raw

PATCH 1/1 ocfs2/trivial: Add default mask log for heartbeat.c

Quoted 6 lines · Sunil Mushran

Maybe better if we changed the two mlog(0,... to mlog(ML_HEARTBEAT,...

Now I don't know why we don't have a default mask in that file but instead have distinct mlogs for HEARTBEAT and HB_BIO. One reason could have been to limit the logging of hb_bio. If that is correct, then adding a default mask will defeat the purpose.

yeah, I just got that two mlog(0,...) and tried to find the default mask and failed. Don't know the real reason for it. Will redo the patch as you like.

But the point I don't get is that why add a default mask will have an effect on mlog(ML_HB_BIO,...)?

Regards,
Tao

Quoted 26 lines
Quoted 23 lines · Tao Ma

I just noticed today that we have no default mask prefix for fs/ocfs2/cluster/heartbeat.c, but we have 2 places that use "mlog(0,...)". So add the default prefix so that these "mlog(0, ...)" can work.

---
 fs/ocfs2/cluster/heartbeat.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/cluster/heartbeat.c +1 -0
index c452d11..edec9bf 100644
@@ -40,6 +40,7 @@
 #include "nodemanager.h"
 #include "quorum.h"
 
+#define MLOG_MASK_PREFIX ML_HEARTBEAT
 #include "masklog.h"
 
 
#3 lore raw

PATCH 1/1 ocfs2/trivial: Add default mask log for heartbeat.c

Quoted 10 lines · Tao Ma
Quoted 9 lines · Sunil Mushran

Maybe better if we changed the two mlog(0,... to mlog(ML_HEARTBEAT,...

Now I don't know why we don't have a default mask in that file but instead
have distinct mlogs for HEARTBEAT and HB_BIO. One reason could have been to
limit the logging of hb_bio. If that is correct, then adding a default mask
will defeat the purpose.

Quoted 6 lines

yeah, I just got that two mlog(0,...) and tried to find the default mask and failed. Don't know the real reason for it. Will redo the patch as you like.

But the point I don't get is that why add a default mask will have an effect on mlog(ML_HB_BIO,...)?

Reverse. As in, if we make that the default, then the mlogs marked hb_bio will also print when we only want heartbeat.

Now how does that matter? Probably very little, if at all. But we will be revisiting tracing/logging sometime next year. So I would make minimal changes in this area right now.

author
#4 lore raw

PATCH 1/1 ocfs2/trivial: Add default mask log for heartbeat.c

Quoted 15 lines · Sunil Mushran
Quoted 14 lines · Tao Ma
Quoted 9 lines · Sunil Mushran

Maybe better if we changed the two mlog(0,... to mlog(ML_HEARTBEAT,...

Now I don't know why we don't have a default mask in that file but instead
have distinct mlogs for HEARTBEAT and HB_BIO. One reason could have been to
limit the logging of hb_bio. If that is correct, then adding a default mask
will defeat the purpose.

yeah, I just got that two mlog(0,...) and tried to find the default mask and failed. Don't know the real reason for it. Will redo the patch as you like.

Quoted 5 lines
Quoted 2 lines

But the point I don't get is that why add a default mask will have an effect on mlog(ML_HB_BIO,...)?

Reverse. As in, if we make that the default, then the mlogs marked hb_bio will also print when we only want heartbeat.

oh, I see. thanks for the explanation.

Quoted 4 lines

Now how does that matter? Probably very little, if at all. But we will be revisiting tracing/logging sometime next year. So I would make minimal changes in this area right now.

ok, no problem. I will regenerate the patch.

Regards,
Tao