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