LU-3669 mdt: getxattr intent should check object existence

Make getxattr intent use HABEO_CORPUS similar to
REINT_GETXATTR to avoid crashes on race conditions.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: Ic277525152847118fbe95fcc73448945acba699d
Reviewed-on: http://review.whamcloud.com/7191
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-3656 tests: use full path to directio

The sanity-benchmark iozone directio test is skipped if started not
from lustre/tests directory because of related path used.
Patch fixes this test to use DIRECTIO instead of ./directio

Signed-off-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Xyratex-bug-id: MRP-1170
Change-Id: I4dec24b38300df8a14fb8f74f84b4f91c0cde910
Reviewed-on: http://review.whamcloud.com/7173
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2940 llite: Fix for oops in vvp_pgcache_show()

Hold the lock protecting page tree (coh_page_guard) till the point the page is
being accessed.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I9d1d5129d9cac8f1fa5eec77f554320c0c255fc2
Reviewed-on: http://review.whamcloud.com/7192
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3433 clio: wrong cl_lock usage

granted lock is moved to HELD state in cl_wait_try() only which is
done after upcall for non-agl locks. as the result, lock unuse moves
cl_lock not to CACHED state, but to NEW state. A parallel thread
gets this lock and tries to enqueue it - instead of re-using a
cached lock, cl_enqueue_try() initiates a new enqueue and gets to
osc_lock_enqueue() where it asserts:

LASSERTF(ols->ols_state == OLS_NEW, ...);

the state of osc lock is RELEASED already - moved here by unuse.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I611a6e8778871da184db13434d223036625443c8
Reviewed-on: http://review.whamcloud.com/6709
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3097 build: fix 'stray semicolon' errors

Fix 'stray semicolon' issues found by Coverity version 6.5.1:
Stray semicolon (STRAY_SEMICOLON)
"if" statement with no "then" or "else" is suspicious.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ieff4b45204f8be9ad4590cc9de9d06960c07d052
Reviewed-on: http://review.whamcloud.com/7165
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3097 build: fix 'deadcode' errors

Fix 'deadcode' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I720a5ae6f963cd2cc77208a854ca4587758a82d5
Reviewed-on: http://review.whamcloud.com/7167
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3069 build: fix 'integer handling' issues

Fix 'program hangs' defects found by Coverity version 6.5.1:
Improper use of negative value (NEGATIVE_RETURNS)
Variable is passed to a parameter that cannot be negative.
Macro compares unsigned to 0 (NO_EFFECT)
This comparison is always true.
Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
Test is always false regardless of the values of its operands.
Wrong operator used (CONSTANT_EXPRESSION_RESULT)
Test is always true regardless of the values of its operand.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I687a05aaffad13caaebe16edbc4f93ef7ca3413f
Reviewed-on: http://review.whamcloud.com/5888
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
New tag 2.4.90

Change-Id: Iccc12581222bf19c71464c1df06e3f5fe21ee596
LU-1346 libcfs: cleanup macros in kp30.h

Some macro cleanup in kp30.h

Some other changes:
. removes some unused/reduplicate macros such as
our_recalc_sigpending, prepare_work, cfs_get_work_data, strtok,
work_struct_t, SEM_COUNT, PORTAL_SYMBOL_REGISTER/UNREGISTER,
cfs_num_present_cpus, cfs_num_present_cpus
. moves some different kernel version compatible macros/inlines to
  portals_compat25.h
. needs not differentiate CONFIG_SMP for LASSERT_SPIN_LOCKED
. get/put_cpu is avaiable for both SMP and !SMP

This patch does not change LWT(Light-weight trace) related code.

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: Iaa3cda88d539f3d7e677b7accda99b476daeddca
Reviewed-on: http://review.whamcloud.com/4776
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>