Blame SOURCES/rhbz1171823.patch

eb15f5
commit f73985072571f93684e7742733d8d06b477b02bf
eb15f5
Author: David Smith <dsmith@redhat.com>
eb15f5
Date:   Mon Dec 8 14:04:19 2014 -0600
eb15f5
eb15f5
    Fix BZ1171823 by updating the __svc_fh() nfsd tapset function.
eb15f5
    
eb15f5
    * tapset/linux/nfsd.stp: Rewrite __svc_fh() in systemtap script language
eb15f5
      instead of embedded-C to get around the disappearance of struct svc_fh's
eb15f5
      declaration from a public kernel header file.
eb15f5
eb15f5
diff --git a/tapset/linux/nfsd.stp b/tapset/linux/nfsd.stp
eb15f5
index 701a81d..7ec2856 100644
eb15f5
--- a/tapset/linux/nfsd.stp
eb15f5
+++ b/tapset/linux/nfsd.stp
eb15f5
@@ -38,22 +38,23 @@
eb15f5
  *15 :nfsd.proc3.rename.tfh
eb15f5
  */
eb15f5
 
eb15f5
-/*Get file handler from struct svc_fh */
eb15f5
-function __svc_fh:string(fh :long) %{  /* pure */
eb15f5
-	struct svc_fh * fhp = (struct svc_fh *) (unsigned long)(STAP_ARG_fh);
eb15f5
-	struct knfsd_fh *fh = &fhp->fh_handle;
eb15f5
-
eb15f5
-	snprintf(STAP_RETVALUE, MAXSTRINGLEN,
eb15f5
-			"%d: %08x %08x %08x %08x %08x %08x",
eb15f5
-			kread(&(fh->fh_size)),
eb15f5
-			kread(&(fh->fh_base.fh_pad[0])),
eb15f5
-			kread(&(fh->fh_base.fh_pad[1])),
eb15f5
-			kread(&(fh->fh_base.fh_pad[2])),
eb15f5
-			kread(&(fh->fh_base.fh_pad[3])),
eb15f5
-			kread(&(fh->fh_base.fh_pad[4])),
eb15f5
-			kread(&(fh->fh_base.fh_pad[5])));
eb15f5
-	CATCH_DEREF_FAULT();
eb15f5
-%}
eb15f5
+@define __svc_fh_cast(fhp)
eb15f5
+%(
eb15f5
+	@cast(@fhp, "svc_fh", "kernel:nfsd")->fh_handle
eb15f5
+%)
eb15f5
+
eb15f5
+/* Get file handler data from struct svc_fh */
eb15f5
+function __svc_fh:string(fhp:long)
eb15f5
+{
eb15f5
+	return sprintf("%d: %08x %08x %08x %08x %08x %08x",
eb15f5
+			@__svc_fh_cast(fhp)->fh_size,
eb15f5
+			@__svc_fh_cast(fhp)->fh_base->fh_pad[0],
eb15f5
+			@__svc_fh_cast(fhp)->fh_base->fh_pad[1],
eb15f5
+			@__svc_fh_cast(fhp)->fh_base->fh_pad[2],
eb15f5
+			@__svc_fh_cast(fhp)->fh_base->fh_pad[3],
eb15f5
+			@__svc_fh_cast(fhp)->fh_base->fh_pad[4],
eb15f5
+			@__svc_fh_cast(fhp)->fh_base->fh_pad[5])
eb15f5
+}
eb15f5
 
eb15f5
 function nfs3_cmode:string(cmode:long) %{ /* pure */
eb15f5
 	int cmode = (int)(long)STAP_ARG_cmode;
eb15f5
eb15f5
commit 957812abcb03ad5eb2b544c7fff111b967deb211
eb15f5
Author: David Smith <dsmith@redhat.com>
eb15f5
Date:   Mon Dec 8 16:17:06 2014 -0600
eb15f5
eb15f5
    BZ117823: Simplify fix using typed-integers.
eb15f5
    
eb15f5
    * tapset/linux/nfsd.stp: Simplify __svc_fh() fix which removes macro.
eb15f5
eb15f5
diff --git a/tapset/linux/nfsd.stp b/tapset/linux/nfsd.stp
eb15f5
index 7ec2856..7aebb9c 100644
eb15f5
--- a/tapset/linux/nfsd.stp
eb15f5
+++ b/tapset/linux/nfsd.stp
eb15f5
@@ -38,22 +38,14 @@
eb15f5
  *15 :nfsd.proc3.rename.tfh
eb15f5
  */
eb15f5
 
eb15f5
-@define __svc_fh_cast(fhp)
eb15f5
-%(
eb15f5
-	@cast(@fhp, "svc_fh", "kernel:nfsd")->fh_handle
eb15f5
-%)
eb15f5
-
eb15f5
-/* Get file handler data from struct svc_fh */
eb15f5
+/* Get file handle data from struct svc_fh. */
eb15f5
 function __svc_fh:string(fhp:long)
eb15f5
 {
eb15f5
-	return sprintf("%d: %08x %08x %08x %08x %08x %08x",
eb15f5
-			@__svc_fh_cast(fhp)->fh_size,
eb15f5
-			@__svc_fh_cast(fhp)->fh_base->fh_pad[0],
eb15f5
-			@__svc_fh_cast(fhp)->fh_base->fh_pad[1],
eb15f5
-			@__svc_fh_cast(fhp)->fh_base->fh_pad[2],
eb15f5
-			@__svc_fh_cast(fhp)->fh_base->fh_pad[3],
eb15f5
-			@__svc_fh_cast(fhp)->fh_base->fh_pad[4],
eb15f5
-			@__svc_fh_cast(fhp)->fh_base->fh_pad[5])
eb15f5
+	svc_fh = &@cast(fhp, "svc_fh", "kernel:nfsd")->fh_handle
eb15f5
+	return sprintf("%d: %08x %08x %08x %08x %08x %08x", svc_fh->fh_size,
eb15f5
+		       svc_fh->fh_base->fh_pad[0], svc_fh->fh_base->fh_pad[1],
eb15f5
+		       svc_fh->fh_base->fh_pad[2], svc_fh->fh_base->fh_pad[3],
eb15f5
+		       svc_fh->fh_base->fh_pad[4], svc_fh->fh_base->fh_pad[5])
eb15f5
 }
eb15f5
 
eb15f5
 function nfs3_cmode:string(cmode:long) %{ /* pure */