LU-3544 fid: add a connect flag for open by FID

Add OBD_CONNECT_OPEN_BY_FID for open by FID, if MDS supports this
, for open by FID, it won't retry with name if object with the FID
doesn't exist; while if client supports this, client won't pack name in
open request if FID is known.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I158b96e8f55fe357b3542d320e894aeca18fca94
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3544 llite: simplify dentry revalidate

Lustre client dentry validation is protected by LDLM lock, so
any time a dentry is found, it's valid and no need to revalidate
from MDS, and even it does, there is race that it may be
invalidated after revalidation is finished.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I7700cbaddc4ec08e12c9f7d8021783a6135dd35a
Reviewed-on: http://review.whamcloud.com/7475
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3240 mdt: comments on LOOKUP and PERM lock

1. Add more comments for MDS_INODELOCK_PERM and
MDS_INODELOCK_LOOKUP.

2. Add sanity 39p for checking nlink of remote
directories.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I58a697f2aee02924f716333d8619873131db84f7
Reviewed-on: http://review.whamcloud.com/7937
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2744 build: fix 'data race condition' issues

Fix 'data race condition' defects found by Coverity version
6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ib5477c494feedd0b4ab052ccd9db9ea99f47101b
Reviewed-on: http://review.whamcloud.com/6575
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-3992 libcfs: Fix NUMA emulated mode

Kernel commit c1c3443c9c5e9be92641029ed229a41563e44506
assigns all allowed cpus to emulated node.

End cpt initialization loop when all CPUs are assigned.

Change-Id: I4cf22e4cf58cd8377cf19af30217fec72503be69
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/7724
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1993 llite: debugging for ll_file_open LASSERT

Add debugging for LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF)
in ll_file_open(), since this is a rarely hit failure under racer,
and it would be useful to get more information if this is hit
again.  Print the full intent disposition, as well as the status,
in case Oleg's earlier comment about bailing out on any error is
actually the case here.

Test-Parameters: envdefinitions=DURATION=1800 testlist=racer
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ie03f706bcb32b03d94c84c5d80dae197813ebbe5
Reviewed-on: http://review.whamcloud.com/6250
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4065 mdt: Ensure accurate coordinator state

Some control must be added in procfs interface to
ensure that the coordinator state will be kept accurate.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I41e5b42ddbdbcb652c202ee01fa120126e78f3d2
Reviewed-on: http://review.whamcloud.com/8074
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4082 llite: Chk ret of ll_prep_md_op_data in ll_dir_filler

ll_dir_filler() now checks the returned pointer from
ll_prep_md_op_data() using IS_ERR()

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Ia4321db2ca9dddaa4487f62544de10239120bad3
Reviewed-on: http://review.whamcloud.com/8073
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4124 build: make module installation directory flexible

Add --with-kmp-moddir option to configure.

Distributions vary in the installation directory for kernel modules.

The RHEL standard installation directory is
        /lib/modules/$(uname -r)/extra
while the SLES standard is
        /lib/modules/$(uname -r)/updates

Adding the option --with-kmp-moddir option to configure allows users
to select the appropriate installation target.  With this change, it
is neccessary to support both options in the test framework.

Signed-off-by: Stephen Champion <schamp@sgi.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iec3137e0e5039dd43622c2e285030a5339fa6fd3
Reviewed-on: http://review.whamcloud.com/8065
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4223 tests: delete loop device when umount

Delete loop device with umount -d, to avoid loop device leaking.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I55bafefa1d387116333aafc71b599ef888c57a2b
Reviewed-on: http://review.whamcloud.com/8296
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>