LU-3626 tests: More time to allow mds-ost sync being finished

Because mds-ost unlink log synchronization is not enforced by any
timeout, so we will add more time to allow mds-ost sync being
finished in replay-single test_20b. And also add more information
in the tests to help us understand which MDT slow down the
synchronziation.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I5f63540e602ad29cd221de6dac0c22546629a9cd
Reviewed-on: http://review.whamcloud.com/7676
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
LU-3055 libcfs: remove page_collection::pc_lock

page_collection::pc_lock is supposed to protect race between
functions called by smp_call_function(), however we don't have
this use-case for ages and page_collection only lives in stack
of thread, so it is safe to remove it.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I89ca46e6593838d85fc0b91d1ff7c35cc28cf4ce
Reviewed-on: http://review.whamcloud.com/7660
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3764 tests: Make calls to error_ignore not trigger FAIL

Currently, error_ignore calls error_noexit with a status of IGNORE
and a message/comment. error_noexit writes the comment to
the $LOGDIR/err file. If there is an err file, the pass
routine assumes the test failed and reports the test status as FAIL.
So, for errors that should be ignored, we don't want to be
writing the comment out to the err file.

Now, any message with an "IGNORE" status is written to
$LOGDIR/ignore file and, thus, the test will no longer be
classified as FAIL and the error will really be ignored.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I30f5387105f6cbce54050682b16387f73ab541d6
Reviewed-on: http://review.whamcloud.com/7782
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3880 tests: Allow error_ignore to accept any bug number

error_ignore is called when a test and an error is encountered
that is supposed to be ignored. The first argument to
error_ignore is a bug number, justification as to why the error
should be ignored, that the routine assumes is a bugzilla bug
number and automatically attaches a “bz” prefix to the number.
This patch removes the assumption that all bug numbers are bugzilla
numbers and moves adding the “bz” to the bug number to the
individual calls to error_ignore. Now, we can use “LU” bug
numbers with error ignore.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I40c47ccf6af76e76bff99c67816e0d2aebd37e71
Reviewed-on: http://review.whamcloud.com/7791
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
LU-4066 test: use $LUSTRE to locate server modules

In test-framework.sh's init_test_env look for $LUSTRE/mdt/mdt.ko
rather than `$dirname $0`/../mdt/mdt.ko to determine if the server
modules are present when they cannot be found in /lib/modules.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib16eee4d7811afcb310c7b0fd4a401ea5af2e7ad
Reviewed-on: http://review.whamcloud.com/7854
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4070 build: RPM build errors

Move %{_bindir}/mcreate and %{_bindir}/munlink files under
condition %{with lustre_tests}.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I888086f672f690d9e3518f16edbf090edc8d0f14
Reviewed-on: http://review.whamcloud.com/7860
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
LU-4071 build: Ignore semicolon for Intel compiler

The build fails when if gcc is installed, but Intel compiler
is defined for mpicc. It does ignore semicolon for this case.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: Ia3306b32c8d886f7a3123ff3c6c967343f0c26b0
Reviewed-on: http://review.whamcloud.com/7864
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
LU-3491 llite: Replace printing of i_ino with ll_inode2fid()

The printing of i_ino/i_generation in llite messages is not nearly so
useful as printing the full inode FID, since i_ino is a "compressed"
version of the FID and there may be duplicate values for i_ino in some
cases (especially if running on a 32-bit client).

All instances of printing i_ino/i_generation are replaced with
the FID using ll_inode2fid(). All instances, except for one, of
printing just i_ino was replaced by printing the FID. In all
CERROR lines touched by the i_ino replacements, the device name
or fsname was added at the beginning of the message if it did not
already exist.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ia32af1357729bf1951e0b713e75986c8177dd946
Reviewed-on: http://review.whamcloud.com/6848
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-4055 build: fix 'error handling' issues

Fix 'error handling' issues found by Coverity version 6.6.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.
Argument cannot be negative (NEGATIVE_RETURNS)
Negative value used as argument to a function expecting a
positive value.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I1ea3428febee741be15215fcc89266a814e5fe1b
Reviewed-on: http://review.whamcloud.com/7842
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Revert "LU-2622 obdclass: Remove the global cl_env list"

This reverts commit 22bdd8848014d1e72a770935cdff81dd7b6af5a7.
LU-3858 test: fix sanity 27A failure caused by stripe delay

When clearing the stripe of root directory, the updating of stripe
might be delayed because of the processing delay of config log.
This will cause the failure of sanity 27A test.

This makes the test suit wait for the update of root directory
stripe.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Ib4f96d9d4d0ae8a0b54e3e306a7abed758dbdf39
Reviewed-on: http://review.whamcloud.com/7495
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1199 rpm: don't clean up $RPM_BUILD_ROOT in %build

The %clean macro cleans up the buildroot. Doing it manually
makes the SUSE build system complain and breaks short-circuiting.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I4a6b5ebfa34d9fcfddfb0608d4f7dcce3f88a3ef
Reviewed-on: http://review.whamcloud.com/5491
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4109 tests: raise out-of inode LOV EA detection threshold

Sanity sub-test 57b sometimes failed because the threshold (< 8K
of MDT space) it used to detect if LOV EA has been stored out-of
inode is too short (vs space also allocated for llog files, ChangeLog,
etc). So raising threshold to 16.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I0f59328d59da69911473433769ff683ff4fdf452
Reviewed-on: http://review.whamcloud.com/8156
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3853 tests: mpiexec requires strict global/local args order

Put -machinefile option ahead of other mpiexec options, since some
version of mpiexec (at least 1.90) requests global options be put
before its local options, and -machinefile is a global options.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ib188881a78a2b345552e8c6070f7dfa7a086ce5d
Reviewed-on: http://review.whamcloud.com/7493
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3885 ldlm: check all errors during ldlm_proc_setup()

Fix ignorig errors from lprocfs_add_vars() function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ie2429f91ad5ac6de8d7e9027a0cd2907588294d3
Reviewed-on: http://review.whamcloud.com/8115
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3810 obd: Cleanup client import if client_obd_setup fails

client_obd_setup() allocates an obd_import which should be cleaned up
if there is any failure afterwards in callers of client_obd_setup().
This patch fixes the bug in osc_setup(), mgc_setup(), mdc_setup() and
lwp_setup(). The fix is to call obd_cleanup_client_import() before
calling client_obd_cleanup() in case of an error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Ib8c2194d80fd14538d4ca42fb8084c93dd575199
Reviewed-on: http://review.whamcloud.com/7561
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4028 quota: improve lfs quota output

- print the total allocated block/inode limit for all OSTs/MDTs
  when the verbose option is specified;
- add 'h' option to print used space in human readable format;

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Idc9cd3d92a50744885f65e82c9ce53b332c1959a
Reviewed-on: http://review.whamcloud.com/8152
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
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-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-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>