Bug 762205 (GLUSTER-473)

Summary: Trace misreporting pre/post attributes for setattr.
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: traceAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 3.0.0CC: aavati, shehjart
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeff Darcy 2009-12-15 15:31:48 UTC
This looks like just a typo, but it causes the pre-attribute string to get overwritten by the post-attribute string and the post-attribute string to remain null.  This can cause a bit of confusion while trying to debug other problems.  ;)  Here's the one-line patch.

git diff -w xlators/debug/trace/src/trace.c
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -505,7 +505,7 @@ trace_unlink_cbk (call_frame_t *frame,
        if (trace_fop_names[GF_FOP_UNLINK].enabled) {
                if (op_ret >= 0) {
                         preparentstr = trace_stat_to_str (preparent);
-                        preparentstr = trace_stat_to_str (postparent);
+                        postparentstr = trace_stat_to_str (postparent);
 
                        gf_log (this->name, GF_LOG_NORMAL,
                                "%"PRId64": (op_ret=%d, *preparent = {%s}, "

Comment 1 Shehjar Tikoo 2009-12-18 12:54:24 UTC
Thats correct. I have this and a bunch of other fixes to trace already in my private tree. I'll be sending them along with NFS patches in a couple of weeks.

Thanks for reporting.

Comment 2 Anand Avati 2010-01-23 19:30:55 UTC
PATCH: http://patches.gluster.com/patch/2687 in master (trace: multiple fixes)

Comment 3 Anand Avati 2010-03-04 08:12:40 UTC
PATCH: http://patches.gluster.com/patch/2826 in master (trace: Do not clobber own itable)

Comment 4 Anand Avati 2010-03-04 08:12:44 UTC
PATCH: http://patches.gluster.com/patch/2828 in master (trace: Print correct variable in lookup_cbk)

Comment 5 Anand Avati 2010-03-04 08:12:51 UTC
PATCH: http://patches.gluster.com/patch/2838 in master (trace: Print st_dev for struct stat)

Comment 6 Anand Avati 2010-03-04 08:12:54 UTC
PATCH: http://patches.gluster.com/patch/2829 in master (trace: Do not print results on failed readlink)

Comment 7 Anand Avati 2010-03-04 08:12:57 UTC
PATCH: http://patches.gluster.com/patch/2845 in master (trace: Display op_errno even on successful readv)