Revert "LU-1227 tests: mds-survey.sh should check ost's space"

This reverts commit 66b46a340dcadca1a3835da61fd4cfc49ba73caa.
Revert "LU-1082 test: create test for mds-survey"

This reverts commit 33d04aafa88be029b5eaaff478da779b9f9436a0.
MRP-471 libcfs: crypto hash support for <= 2.6.18 kernels.

MRP-377 add libcfs crypto hash based on shash, but previous kernel
have no shash api. And 2.6.18 have no hash api. This patch add
support for 2.6.28 and previous kernel.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Xyratex-bug-id: MRP-471
MRP-314 libcfs: add crc32 pclmul implementation

Add crc32 pclmul implementation to libcfs crypto hash. If processor
supports intel instruction PCLMULQDQ, the crc32 pclmul algo is used
for crc32 calculation.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Xyratex-bug-id: MRP-314
LU-338 ldlm: mdc lock inode reference moved to resource

There is a race condition while get_attr after cancel_lru_locks
and sysctl drop_caches. ll_clear_inode clears l_ast_data for
ldlm lock and this lock can't be canceled because "inode == NULL".
ll_mdc_blocking_ast finds such lock. As result DCACHE_LUSTRE_INVALID
is not set and lookup returns wrong inode.

This patch moves inode structure reference to
"ldlm_lock::l_resource::lr_lvb_inode". This prevents from different
inode references for same resource's lock.

Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Revert "MRP-314 libcfs: add crc32 pclmul implementation"

This reverts commit a3d46ae46d4c5c4d410be1ab687097afb1ee7f7d.
as it is planned for neo 1.3
MRP-487 VM_FAULT_ERROR causes false OOM

Lustre shouldn't be using VM_FAULT_ERROR as a return value.
It should return a single error.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
MRP-399 Lustre OST object allocator need to be tuned

Fix osc_precreate() return values.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
MRP-519 decrease debug level

proceeding with LU-1098, LU-1095, decrease the debug level in a couple
more places.

Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
MRP-121 initialize ucred for CLOSE rpc.

used to be "changelog CLOSE event fix", but this comment was misleading.

Reviewed-by: alexey_lyashkov@xyratex.com
MRP-484 ucred cleanup

add ucred_check() and ucred_assert() methods to ensure ucred is installed
and/or initialised everywhere.

Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
MRP-488 spec: add lustre-test dependencies

It is inconvenient to run tests to have them fail due to missing
tool packages.  Added attr, acl, e2fsprogs, perl and pdsh
to the "Requires:" tag for lustre-tests

Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
MRP-308 spec: create lustre-headers RPM

Source RPM's can only build against installed packages. You must not
have them depend upon known locations of build trees of other projects
(e.g. lustre build). Therefore, for the sake of enabling source RPM's
of our ancillary projects, we need this development RPM for lustre.

Reviewed-by: Denis Kondratenko <denis_kondratenko@xyratex.com>
Reviewed-by: Dave Cohrs <dave_cohrs@us.xyratex.com>
Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Xyratex-bug-id: MRP-308
MRP-385 ldlm: replace waiting flock lists by hashes

replace per-export list by per-export hash to locate a lock with
blocking export & owner.

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
MRP-412 another flock deadlock detection issue

Add lock to blocking list before deadlock
check to prevent race

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
MRP-449 Fix flock deadlock detection for files from different mounts

Search for blocking owner in all obd's exports with the same NID.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
MRP-497 osc: decrease errorlevel for DEADLOCK

Deeadlock possible error occured always when thread
have to sleep, and this is usual code path for waiting lock.
We don`t need to worry about it, so decrease errorlevel will help.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
MRP-526: Make Lustre ready for gcov

gcov requires profiled code to be built with compiler options -fprofile-arcs
-ftest-coverage. To profile all project this options should be passed during
every source file compilation. This option enable debug logging. No all
Lustre parts are ready for debug logging now. To fix this problem this patch
should be applied.

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
MRP-153 Add "--erase-param", change "--param" behaviour in tunefs.lustre

A new option is added to tunefs.lustre, "--erase-param", which allows to
remove all instances of a specific parameter.

This patch should come with a warning, as it introduces a change in current
behaviour: option "--param" is modified to erase all previously stored
instances of the parameter, and store all new instances of the parameter
specified in the command line.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
MRP-492 tests: add to sanity 156 and 200h nodsh check.

If there is no dsh 156 and 200h FAIL. Add nodsh check
to sanity 156 and 200h.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Denis Kondratenko <denis_kondratenko@xyratex.com>
Reviewed-by: Iurii Golovach <iurii_golovach@xyratex.com>