LU-5331 obdclass: serialize lu_site purge

Umount process relies on lu_site_purge(-1) to purge all
objects before umount, however, if there happen to have a
cache shrinker which calls lu_site_purge(nr) in parallel,
some objects may still being freed by cache shrinker even
after the lu_site_purge(-1) called by umount done.

This can be simply fixed by serializing purge threads,
since it doesn't make any sense to have them in parallel.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Iec5d7fd1d5714ad0e4bd12a50a837858a60b2b1c
Reviewed-on: http://review.whamcloud.com/11099
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 obdclass: convert to linux list api

Move from the cfs_[h]list api to the native linux api for
all the code related to obdclass.

Change-Id: Id773b6c83b22cac5b210b6d41b470a2c8d6e206d
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10525
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 ptlrpc: convert to linux list api

Move from the cfs_[h]list api to the native linux api for
the ptlrpc layer.

Change-Id: I6bc059be4530c53bbd4b51d2fdd84608727ee371
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10526
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
LU-3963 ofd: convert to linux list api

Move from the cfs_[h]list api to the native linux api for
all the code related to OFD.

Change-Id: I83ee0ed2bff48a517174113859cc3f4c07fd797e
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10921
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5389: optimize ll_fid2path()

The only parameter from userspace that matters is the length of the
buffer. We don't need to allocate then import the whole structure. By
importing only that length, we can save a memory allocation.

Add sparse annotations to that function.

Change-Id: I4baa941f0128f9bcc19fade112915f3c52cd5b8b
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11167
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2456 lnet: Dynamic LNet Configuration (DLC)

This is the first patch of a set of patches that enables DLC.

This patch adds some cleanup in the config.c as well as some
preparatory changes in peer.c to enable dynamic network
configuration

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I8c8bbf3b55acf4d76f22a8be587b553a70d31889
Reviewed-on: http://review.whamcloud.com/9830
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4975 ofd: documenting the ofd_objects.c

Fix up GPL header block to reference proper GPLv2 license URL.
Remove mention of contacting Sun, since they don't exist anymore.
Add introductory comment block for the ofd_objects.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ib70053abb0f81452938403d64aafaa8a568678c0
Reviewed-on: http://review.whamcloud.com/10644
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
LU-5379 ptlprc: return 0 if buf in struct seq_file is overflow

Former version would get error if the length of content in
nrs_tbf_rul is larger than one page. This patch fix this
problem, now nrs policy tbf could make rules as many as
possible.

Ptlrpc_nrs_policy_control return -ENOSPC means the buf in
parameter struct seq_file is overflow, we return 0 in this
situation to make upper layer function seq_read to alloc a more
larger memory area and do this process again.

Signed-off-by: Wu Libin <lwu@ddn.com>
Change-Id: I436a6b5b58e33e46fb896b6f4d56f64a8ff5a732
Reviewed-on: http://review.whamcloud.com/11154
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4367 llite: Make revalidate return 0 for opens

This is important so that we can properly engage opencache when needed.

This also reshuffles some other logic in ll_revalidate_dentry to
more properly handle intermediate component revalidate logic.

Change-Id: Ib4f272155096d33fe3f45b781e21e5bd4f44ff58
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/11062
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>