e7a346
From 0ac638b415be75c51716e8439f2a6459fd5b999b Mon Sep 17 00:00:00 2001
e7a346
From: Csaba Henk <csaba@redhat.com>
e7a346
Date: Thu, 3 May 2018 13:35:04 +0200
e7a346
Subject: [PATCH 382/385] mount,fuse: make fuse dumping available as mount
e7a346
 option
e7a346
e7a346
Upsteam-patch: https://review.gluster.org/#/c/glusterfs/+/19955/
e7a346
BUG: 1627098
e7a346
Change-Id: I4dd4d0e607f89650ebb74b893b911b554472826d
e7a346
Signed-off-by: Csaba Henk <csaba@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/150711
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
e7a346
 doc/mount.glusterfs.8                       | 3 +++
e7a346
 xlators/mount/fuse/utils/mount.glusterfs.in | 7 +++++++
e7a346
 2 files changed, 10 insertions(+)
e7a346
e7a346
diff --git a/doc/mount.glusterfs.8 b/doc/mount.glusterfs.8
e7a346
index e16bbec..95aad02 100644
e7a346
--- a/doc/mount.glusterfs.8
e7a346
+++ b/doc/mount.glusterfs.8
e7a346
@@ -128,6 +128,9 @@ disable root squashing for the trusted client [default: off]
e7a346
 \fBroot\-squash=\fRBOOL
e7a346
 enable root squashing for the trusted client [default: on]
e7a346
 .TP
e7a346
+\fBdump\-fuse=\fRPATH
e7a346
+Dump fuse traffic to PATH
e7a346
+.TP
e7a346
 \fBuse\-readdirp=\fRBOOL
e7a346
 Use readdirp() mode in fuse kernel module [default: on]
e7a346
 .PP
e7a346
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
e7a346
index 36b60ff..b39bb98 100755
e7a346
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
e7a346
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
e7a346
@@ -261,6 +261,10 @@ start_glusterfs ()
e7a346
         cmd_line=$(echo "$cmd_line --xlator-option=$xlator_option");
e7a346
     fi
e7a346
 
e7a346
+    if [ -n "$dump_fuse" ]; then
e7a346
+        cmd_line=$(echo "$cmd_line --dump-fuse=$dump_fuse");
e7a346
+    fi
e7a346
+
e7a346
     # if trasnport type is specified, we have to append it to
e7a346
     # volume name, so that it fetches the right client vol file
e7a346
 
e7a346
@@ -486,6 +490,9 @@ with_options()
e7a346
         "use-readdirp")
e7a346
             use_readdirp=$value
e7a346
             ;;
e7a346
+        "dump-fuse")
e7a346
+            dump_fuse=$value
e7a346
+            ;;
e7a346
         "event-history")
e7a346
             event_history=$value
e7a346
             ;;
e7a346
-- 
e7a346
1.8.3.1
e7a346