Whamcloud - gitweb
LU-8066 obd: final pieces for sysfs/debugfs support. 08/28108/24
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 22 Feb 2018 17:26:16 +0000 (12:26 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 6 Mar 2018 23:58:39 +0000 (23:58 +0000)
commit0100ab268c3120aa84847a88a2493988f38dee6b
tree0ad197901b4fa793f6ae818d872ac367b367b36b
parentcf6b8f530fdd9a494207f59dc8d08c345d1a7570
LU-8066 obd: final pieces for sysfs/debugfs support.

This patch puts in place the basics needed for debugfs.
It also creates class_setup_tunables so sysfs kobject
creation is handled for both obd_devices and llite. Add a
special LDEBUGFS_FOPS_WR_ONLY since often in this case
i_private is not set so any attempt to call PDE_DATA(inode)
will cause it to crash. Make lprocfs_obd_setup select either
debugfs or procfs but not both.

Handle the special symlinks needed for both debugfs
and sysfs with the server case. For lod we need to
create "lov" and osp we create "osc" for both sysfs
and debugfs. Handle the complex case of when a node
is both a server and client. For debugfs we can take
advantage of d_lookup() and for sysfs kset_find_obj()
to avoid special access to struct obd_type. This also
places the burden on the server lod/osp modules instead
of the client lov/osc modules.

Change-Id: I87090859db4da2300ab9e2aa3c23cb3773276103
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28108
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
22 files changed:
lustre/autoconf/lustre-core.m4
lustre/include/lprocfs_status.h
lustre/include/lustre_compat.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/lod/lod_dev.c
lustre/lod/lod_internal.h
lustre/lod/lproc_lod.c
lustre/lov/lov_internal.h
lustre/lov/lov_obd.c
lustre/lov/lproc_lov.c
lustre/mgs/lproc_mgs.c
lustre/obdclass/genops.c
lustre/obdclass/llog_test.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lprocfs_status_server.c
lustre/obdecho/echo_client.c
lustre/osp/lproc_osp.c
lustre/osp/osp_dev.c
lustre/osp/osp_internal.h
lustre/ptlrpc/lproc_ptlrpc.c
lustre/ptlrpc/sec_lproc.c