[RFC,1/3] fs/fuse: add conn_ctl to fuse_conn struct

Submitted by Pavel Butsykin on May 21, 2019, 3:27 p.m.

Details

Message ID 20190521152757.27649-2-pbutsykin@virtuozzo.com
State New
Series "Statistics for vstorage kernel fast-path"
Headers show

Commit Message

Pavel Butsykin May 21, 2019, 3:27 p.m.
This is preparation patch that places sysfs dentry pointer to fc that's
created for each mount point. This will be necessary for forwarding KIO
statistics through sysfs, that will also need to be done separately for each
mount point.

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 fs/fuse/control.c | 2 ++
 fs/fuse/fuse_i.h  | 1 +
 2 files changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/control.c b/fs/fuse/control.c
index 254f048359a8..5ea8ab2165cf 100644
--- a/fs/fuse/control.c
+++ b/fs/fuse/control.c
@@ -570,6 +570,8 @@  int fuse_ctl_add_conn(struct fuse_conn *fc)
 	if (!parent)
 		goto err;
 
+	fc->conn_ctl = parent;
+
 	if (!fuse_ctl_add_dentry(parent, fc, "waiting", S_IFREG | 0400, 1,
 				 NULL, &fuse_ctl_waiting_ops) ||
 	    !fuse_ctl_add_dentry(parent, fc, "abort", S_IFREG | 0200, 1,
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index f7415fdbe58e..0ea0340c6b70 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -788,6 +788,7 @@  struct fuse_conn {
 
 	int ktrace_level;
 	struct fuse_ktrace * ktrace;
+	struct dentry *conn_ctl;
 };
 
 static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb)