Whamcloud - gitweb
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: