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>