Whamcloud - gitweb
LU-3319 procfs: fix symlink handling 38/9038/13
authorJames Simmons <uja.ornl@gmail.com>
Fri, 28 Mar 2014 15:19:07 +0000 (11:19 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 19 Apr 2014 06:21:15 +0000 (06:21 +0000)
commitd8fdc4c1603726e0b893571960938ea9dfe28658
tree880447458df827c6086dae62fe9ec9b22e22a863
parent4f965b8cff863334d536ec8a9806dba5eb10c62f
LU-3319 procfs: fix symlink handling

While working on symlink handling for seq files I noticed a
long outstanding bug. Code was developed to link osc obds
to target_obds of the lov layer. The target_obds directory
was never created for the symlinks. This patch enables this
long forgotten feature. Also addressed is the race condition
experinced with server side code ported to seq_files that
used symlinks. To avoid the race the handle obd_proc_private
was moved from struct obd_device to struct obd_type which
now allows earlier registeration that only happens once.
The second problem addressed is the module loading race.
Several modules share the same top proc directory entry which
can become a issue if a client exist on a server node since
the linux proc system allows multiple directories of the same
name. Original Lustre had a lprocfs_srch but that doesn't
work if you use the kernels internal cache for the proc
system so you need to keep track of who grabs the proc root
first and then use the first one registered for when the
next module loads.

Change-Id: Ib158ec4444ed7abc0f3c3e820ee4a333631a58d1
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9038
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
24 files changed:
lustre/include/lprocfs_status.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/lmv/lmv_obd.c
lustre/lod/lod_dev.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/mdd/mdd_device.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_mds.c
lustre/mgc/libmgc.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_handler.c
lustre/obdclass/genops.c
lustre/obdclass/llog_test.c
lustre/obdclass/lprocfs_status.c
lustre/obdecho/echo_client.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_handler.c
lustre/osp/osp_dev.c
lustre/ost/ost_handler.c
lustre/quota/qmt_dev.c