Blame SOURCES/rhbz1171823.patch

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