[RHEL7,COMMIT] fs/fuse: add conn_ctl to fuse_conn struct

Submitted by Konstantin Khorenko on May 29, 2019, 2:24 p.m.


Message ID 201905291424.x4TEObQT009414@finist-ce7.sw.ru
State New
Series "Statistics for vstorage kernel fast-path"
Headers show

Commit Message

Konstantin Khorenko May 29, 2019, 2:24 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.7
commit fd119278c0229562deb1191a15f9fccd362f7a27
Author: Pavel Butsykin <pbutsykin@virtuozzo.com>
Date:   Wed May 29 17:24:37 2019 +0300

    fs/fuse: add conn_ctl to fuse_conn struct
    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>
    Patchset description:
    Statistics for vstorage kernel fast-path
    Vstorage provides plenty of statistics information via 'vstorage -c cl mnt-top',
    but when it comes kernel fast-path, it doesn't work. All because mnt-top
    command collects information from .vstorage.info directory, where vstorage-mount
    provides a lot of different statistical information in the form of files, but
    it was not implemented for for fast-path.
    This patch-set is aimed to implementation of the support of some statistics
    inforamtion files from .vstorage.info:
    Which will be located at "/sys/fs/fuse/connections/*mnt_id*/kio_stat/". This
    will be enough to maintain vstorage mnt-top command for fast-path mount points.
    Acked-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
    Pavel Butsykin (14):
      fs/fuse: add conn_ctl to fuse_conn struct
      fs/fuse kio: create sysfs stat directory
      fs/fuse kio: implement iostat statistics info
      fs/fuse kio: make interface pcs_kio_file_list() for listing kio files
      fs/fuse kio: make interface pcs_kio_req_list() for listing kio reqs
      fs/fuse kio: add retry counter for kio requests
      fs/fuse kio: implement pcs_strerror()
      fs/fuse kio: implement requests statistics info
      fs/fuse kio: implement fstat statistics info
      fs/fuse kio: implement fstat_lat statistics info
      fs/fuse kio: remove useless pcs_cs initialization
      fs/fuse kio: implement cs statistics accounting
      fs/fuse kio: convert rpc state id to string
      fs/fuse kio: implement cs_stats statistics info
 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 34a4317a9689..841edaf20323 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -790,6 +790,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)