LU-4679 liblustre: remove dead code and clean headers

In liblustre, remove statically unused functions, varaibles and
macros. Also ensure that the headers needed by the c and h files are
included at top level. Prune unneeded includes. In libsysio, include
sys/queue.h in fs.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I878b442b6d0ae17d8d5d33375ca7596618323c52
Reviewed-on: http://review.whamcloud.com/9429
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4759  build: Remove obsolete file. Documentation was removed from the tree FDL needs to be removed also.

Signed-off-by: Cliff White <cliff.white@intel.com>
Change-Id: I7c57491416460af6bbce4c355b4b16888427e73c
Reviewed-on: http://review.whamcloud.com/9770
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4086 tests: strengthen sanity-hsm/test_33

Instead of waiting+checking both Restore and Cancel HSM operations
sequentially, wait for both to be finished and then check each
results. This will allow to handle conditions where Restore
terminates before the Cancel is started.

Also added to wait_all_done() the capability to only work on
requests for a specific fid.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I480ce074513d6829ecb3078c273bac1fdffa6256
Reviewed-on: http://review.whamcloud.com/9600
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 libcfs: convert ptlrpc,quota plus others to linux atomics

This patch converts all cfs_atomic primitives in
liblustre, osp, ptlrpc and quota.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: If21fdd31441d4b2a23df8cbd9db8187bb827ab2f
Reviewed-on: http://review.whamcloud.com/7077
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
LU-4199 libcfs: add CPU table functions for uniprocessor

Some CPU table functions for uniprocessor architecture is
missing.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2b41af63ebb5e4a1362e026d75b87855c1e7e2fa
Reviewed-on: http://review.whamcloud.com/8873
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4199 libcfs: add wrapper of PAGE_SIZE

PAGE_SIZE should not be used from userspace. It is not a
constant on all architectures and new kernels do not export
it to userspace anymore.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ib66534c31c7134833bf4768d3cc8bbc067b1bab4
Reviewed-on: http://review.whamcloud.com/8877
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4588 code: replace semaphores with mutexes

It's just optimization. The mutex subsystem is slightly faster
and has better scalability for contended workloads.

Remove the lustre_lock and it's accessor functions l_lock(),
l_unlock(), l_lock_init(), and l_has_lock() since they have
not been used by the code since Lustre 1.6.  

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I1b6defe7bdea2f7b33638a98c73277290c10bea1
Reviewed-on: http://review.whamcloud.com/9294
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
LU-3319 lprocfs: update nodemap lproc to newer kernel

The PDE macro no longer exist in newer kernels. This
patch moves the PDE usage in the nodemap layer to use
PDE_DATA which is support across all kernels.

Change-Id: Idcfb918e0d4e203ff0f9c6d838a68b1a204ee3bd
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9465
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4063 tests: use $DIR to check file at agent host

12a used to use DIR2 which is not mounted at agent host.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I5cea35c5e20f8c1064902d6b116dbddb1096c150
Reviewed-on: http://review.whamcloud.com/7869
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>