LU-1102 crypto: correctly check crypto_alloc_blkcipher returns

ll_crypto_alloc_blkcipher() returns error value as well as possible
NULL pointer, should check its return value carefully.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I181b236406e2649580a04940886f849ad6071078
Reviewed-on: http://review.whamcloud.com/2703
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1389 lov: standardize lov_do_div64() usage

Rename ll_do_div64() to lov_do_div64() and move it to a header
for use by LOV and LOD.  Lustre shouldn't use linux-specific
methods in the code, so this is a bit of portability fix as well.

Change-Id: Ia6f071914a982c7c7d5f2d11271f9587aea01ed6
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1619
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1205 tests: sanityn test_18 sometimes takes long time to run

This is a live-lock problem where two processes are writing to the
same mmaped file via two nodes. To write a mmap region, both processes
will do:

  acquire cl_lock -> read page -> release cl_lock-> install page.

During the above steps, the page can be truncated after the lock is
released and then immediately cancelled by the other process, so
kernel has to do page fault again and never complete.

Lustre can't handle this case well so this test case is disabled.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I0c3fd5beab388cbed6193ae496d4d0e4f23be797
Reviewed-on: http://review.whamcloud.com/2544
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-911 osd: couple helpers for osd api

- dt_find_or_create() to "open" and create if needed an object
- dt_object_sync() - a wrapper for corresponding osd api method

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If10e2f522f6e5383260a1d729f305ccdc0b02bbb
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1838
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1318 ldlm: allow different LVB structures to be used

The DLM code always assumes that the request buffer storing the LVB is
of type ost_lvb.
This patch allows new LVB types to be defined and used. Although there
is still one single LVB structure defined (i.e. ost_lvb), the new
quota architecture will define its own LVB soon.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I497d774eb4b66029ff2755739bbe75190f6aeee8
Reviewed-on: http://review.whamcloud.com/2649
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-936 Remove LUSTRE_KERNEL_VERSION

Patched kernels are no longer an absolute requirement for
Lustre servers.  Remove the LC_LUSTRE_VERSION_H autoconf
check and all usage of the LUSTRE_KERNEL_VERSION #define.
Going forward any specific kernel dependency should be
expressed with an explicit, clearly documented, autoconf
test.

As part of this change the check for automatically disabling
lustre server support has been moved to the ldiskfs autoconf
checks.  Previously this was done by checking for the
existance of a patched kernel.

Change-Id: Ifb5dcaf62638146a190f5d7417b9462177c5730d
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1873
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1366 utils: disable ldiskfs extents feature for MDT

Explicitly disable "extents" for MDT filesystem if it's based on ext4,
it provides no benifit for MDT.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I9cb4d9cbaa80096cb8182e307e4911a92004ddd4
Reviewed-on: http://review.whamcloud.com/2797
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-482 tests: abort replay-dual if test_0a fails

Due to repeated and annoying LU-482 failures of replay-dual.sh
test_0a, abort the whole test script if test_0a fails.  While this
is not ideal, it is better than disabling replay-dual.sh entirely.

Until bug TT-554 is fixed to display "SKIP" results from a test in
Maloo, we should still be able to detect the LU-482 failures because
replay-dual test will complete in a few seconds instead of thousands.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4bc6b62e0028b908f0fc8afaab0030b0fcdf500c
Reviewed-on: http://review.whamcloud.com/2731
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1350 debug: lower debug message level

File info read and unlink race is normal, we'd lower the debug message
level since a lot of unnecessary unmasked messages will be generated
if mdt_object_find() cannot find those deleted objects.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I5d6e65ad2c2dabadb371fdc4ffd6d8193f1cd0fb
Reviewed-on: http://review.whamcloud.com/2648
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>