[Devel] [PATCH v2 01/14] fs/fuse: add conn_ctl to fuse_conn struct

Pavel Butsykin pbutsykin at virtuozzo.com
Fri May 24 18:54:50 MSK 2019


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 at virtuozzo.com>
---
 fs/fuse/control.c | 2 ++
 fs/fuse/fuse_i.h  | 1 +
 2 files changed, 3 insertions(+)

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)
-- 
2.15.1



More information about the Devel mailing list