afs: fix afs_linux_mmap fstrace entry 68/14168/2
authorMark Vitale <mvitale@sinenomine.net>
Thu, 23 Apr 2020 21:49:20 +0000 (17:49 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 29 Apr 2020 01:25:09 +0000 (21:25 -0400)
The format string for CM_TRACE_GMAP takes 4 substitutions, but
afs_linux_mmap only supplies 3.  This results in malformed output from
fstrace:

Type mismatch, using raw print.
Gn_map vp 0x%lx addr 0x%lx len 0x%x off 0x%x (afs / zcm)raw op
701087775, time 715.322573, pid 9644
p0:0xc0a66ec0 p1:0x8b81a000 p2:131072

Repair the recording of CM_TRACE_GMAP.

Change-Id: I2b7592e68cb42f5ae490ee8771558e5cc5a2181e
Reviewed-on: https://gerrit.openafs.org/14168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/afs/LINUX/osi_vnodeops.c

index 7291e9e..4617a34 100644 (file)
@@ -533,9 +533,9 @@ afs_linux_mmap(struct file *fp, struct vm_area_struct *vmap)
     int code;
 
     AFS_GLOCK();
-    afs_Trace3(afs_iclSetp, CM_TRACE_GMAP, ICL_TYPE_POINTER, vcp,
-              ICL_TYPE_POINTER, vmap->vm_start, ICL_TYPE_INT32,
-              vmap->vm_end - vmap->vm_start);
+    afs_Trace4(afs_iclSetp, CM_TRACE_GMAP, ICL_TYPE_POINTER, vcp,
+              ICL_TYPE_POINTER, vmap->vm_start, ICL_TYPE_LONG,
+              vmap->vm_end - vmap->vm_start, ICL_TYPE_LONG, 0);
 
     /* get a validated vcache entry */
     code = afs_linux_VerifyVCache(vcp, NULL);