LU-5317 build: fix build of Xeon Phi client RPMs

* disable DKMS build for Xeon Phi
* resolve issue with undefined reference to `libcfs_log_return'

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I383ca771fdd1d2cd22cc20a20d69b32af7e6e010
Reviewed-on: http://review.whamcloud.com/11044
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5266 ldlm: granting the same lock twice on recovery

ASSERTION( lock->l_granted_mode != lock->l_req_mode ) is hit
when resending LDLM_FL_REPLAY.

Don't add lock to waiting list as it is already added or granted.

Change-Id: Ib8e5d2c7588f6cacd1723529e70d29f63742caad
Xyratex-bug-id: MRP-1944
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/10903
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-4971 ldlm: drop redundant ibits lock interoperability check

In very old release (older than Lustre-1.8), if the client talks with
the server that does not support ibits lock, then the client needs to
convert it as plain lock. Such interoperability check and convertion
is out of date for a long time. Drop it.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I635df2767ed3b859d93b7ff0680e30ef07d94747
Reviewed-on: http://review.whamcloud.com/11004
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5285 mdt: reconstruct to handle non-existing objects

it's possible that reconstruction finds the object doesn't exist
because the original transaction was committed and the rep-ack
lock got released letting another clients to destroy the object.
we should handle this propely - return attributes to indicate the
object has been unlinked (nlink=0

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I3bc18ff0cdb3b7f6d28e47604cf3e142e3f5bc42
Reviewed-on: http://review.whamcloud.com/11025
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5320: fixes for errors found by coccinelle

This patch fixes 3 errors found by coccinelle (a static analyser):

lustre/ptlrpc/nrs_tbf.c:312:2-8: preceding lock on line 307
lustre/fid/fid_handler.c:73:43-51: ERROR: cli is NULL but dereferenced.
lustre/lfsck/lfsck_lib.c:1564:1-10: second lock on line 1571

Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: Ic00a5c1dd331df879d6a10f11a07ef14f2beefd8
Reviewed-on: http://review.whamcloud.com/11047
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-5318 ptlrpc: export lustre_swab_lmv_mds_md()

lustre_swab_lmv_mds_md() is used in lustre.ko (on little-endian
platforms anyway) so export it from ptlrpc.ko.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idd918751924660a5e40ee7866e8663fb8fb89dc6
Reviewed-on: http://review.whamcloud.com/11046
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
New tag 2.6.50

After split off of b2_6 off master, beginning of 2.7.0 development

Change-Id: If88e685f9fe7d7f720ccf5d1df493efd1026d7dc
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5324 lfsck: invalidly memory access in lfsck_del_target

In lfsck_del_target(), if the given index exceeds the LFSCK targets
bitmap size, then reset the local variable @ltd to avoid to access
non-related memory unexpectedly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia06c24632352667cb452108ba094adea56ce5518
Reviewed-on: http://review.whamcloud.com/11060
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Jenkins
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5326 libcfs: remove umode_t typedef

The umode_t typedef in libcfs/include/libcfs/posix/posix-types.h is no
longer needed and causes lustre_user.h to be unusable outside of the
lustre tree on powerpc64 so remove it.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id38a5b3bb998743c3fd29a244aafea421f94c080
Reviewed-on: http://review.whamcloud.com/11055
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-5332 hsm: Release XATTR lock on exiting

This should be a typo where it should jump to out_unlock instead of
out_ucred.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I03242e40f7e33a115934081375be7c86044fa254
Reviewed-on: http://review.whamcloud.com/11083
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2675 utils: remove unused utilities

Remove the unused lnet utilities: debugctl, lstclient, and ptlctl.
Remove the unused lustre utilities: lrun, lshowmount,
module_cleanup.sh, obdctl, and rmmod_all.sh.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7797f9b1be267ad36bdcd50848cb0e1e656c3c41
Reviewed-on: http://review.whamcloud.com/10510
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5312 fld: retry fld rpc until the import is closed

Since LWP is not replayable, it should retry RPC until
the import is closed, otherwise it would cause unnecessary
failure of the application.

Change-Id: I66d52fefe472ff2b139aa74f837e32a1403c3b2a
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/11039
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5274 llite: fix ll_statahead_thread() problems on failure

When ll_prep_md_op_data() fails, ll_statahead_thread() does not
release reference of sai and parent dentry. It does not wake
up parent thread either. This patch fixes these problems.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Ibcc527d229e8a78710ff2263eb97969c7c46ecdb
Reviewed-on: http://review.whamcloud.com/10940
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4755 ptlrpc: enlarge OST_MAXREQSIZE for 4MB RPC

This patch enlarges OST_MAXREQSIZE so as to make the
request size large enough for 4MB RPC.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I6195c05ced9e6c533c2ad88f21a941f1dddb53e6
Reviewed-on: http://review.whamcloud.com/9599
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5031 tests: obdfilter-survey fixes

There are couple of problems in obdfilter-survey:
- Type of test brw i.e. "g" was not followed with npages,
- Target netdisk was not set properly and
- Turn ON async flag only for mode 3.
This patch fixed the above mention problems.

Signed-off-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Change-Id: I4360b52d1b8d828def6cf316abc09383fcaaaa94
Reviewed-on: http://review.whamcloud.com/10264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5243 utils: use goto rather than GOTO()

In lfs.c, liblustreapi.c, nidstrings.c and lustre_rsync.c use
return, assignments and goto statements rather than the GOTO()
and RETURN() macros.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5e5b5e9e73baadacfbad06ed9eefa1e0d4b9e612
Reviewed-on: http://review.whamcloud.com/10791
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5252 hsm: make path argument to fifo event a const

Neither llapi_hsm_register_event_fifo() nor
llapi_hsm_unregister_event_fifo() take a const as their argument.
This leads to the following compilation warning when a caller is
using a const char *:

  ... warning: passing argument 1 of ‘llapi_hsm_register_event_fifo’
         discards ‘const’ qualifier from pointer target type
         [enabled by default]
   rc = llapi_hsm_register_event_fifo(lustre_fifo_event);
   ^
  ... note: expected ‘char *’ but argument is of type ‘const char *’
  extern int llapi_hsm_register_event_fifo(char *path);

Making path a const fixes this warning.

Change-Id: Ia2544cafefef8d5d1e4cf4cfc6408aac373c447b
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/10807
Reviewed-by: John L. Hammond <john.hammond@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>
LU-5252 hsm: llapi_hsm_event_fd is local, so make it static.

Change-Id: I9905d0251702a11a9c2546ba4bd78fd00658d28a
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/10808
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5128 obdclass: fix a race in recovery

in "class_export_recovery_cleanup", the check of the flag
"exp->exp_req_replay_needed" should be protected by "exp_lock".

Change-Id: I9a1b0583cb15df896e4a608ee0e396bb90486888
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/10849
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5290 clio: reorder initialization in cl_req_alloc()

In cl_req_alloc() ensure that the list heads crq_pages and crq_layers
have been initialized before passing the request to
cl_req_completion(). This fixes an oops in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I1f4ff994ca5db974e97b41452f7351f68ed350f8
Reviewed-on: http://review.whamcloud.com/11009
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>