LU-3694 utils: rewrite posix CT messages

This patch:
- rewrite messages to have a standard format
- add thread id to each message
- use stderr for trace, debug, error

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: If7ac03d1b8ed85a80608cf112925dc53a8839fb0
Reviewed-on: http://review.whamcloud.com/7568
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3829 ldlm: MDT mount fails on MDS w/o MGS on it

If we specify multiple --mgsnode for a MDT, when we start MDS upon
it while MGS is no the other node, the MGC import connection will
always select the local nid (which is one of the candidate mgsnode)
since it think its the closest connection.

This patch treats further --mgsnode nids as failover nids, so that
multiple import connections are added for the MGC import.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ifd015a6df47d4285ff5081a9e1e6eabfc405b193
Reviewed-on: http://review.whamcloud.com/7509
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3185 build: fix autogen with modern autoconf tools

Modern autoconf tools request configure scripts to be more
strict in style, some fixes to improve autoconf usage.

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I954c0fc7be34d84ec279883debc44e7a543ebbe5
Reviewed-on: http://review.whamcloud.com/7490
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3872 tests: Fix rpmlint error in lustre/tests/Makefile.am

This patch is to fix the file permission of the file,
lustre/tests/clientapi/simple_test.c, in lustre/tests/Makefile.am,
which caused the rpmilnt check to fail with error:
"E: spurious-executable-perm (Badness: 50)".

The Makefile.am has simple_test.c as scripts (nobase_noinst_SCRIPTS),
so it is executable. It should be "data" (nobase_noinst_DATA) which
is installed 644.

Signed-off-by: Young Jong Pao <n16490@cray.com>
Change-Id: I83d692bccf8feba48b281a34636f6fd8ec2297f6
Reviewed-on: http://review.whamcloud.com/7537
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-3808 ptlrpc: Return a meaningful status from ptlrpcd_init()

This patch has the following:
1) Fix for the return value from ptlrpcd_init(). It will now return a
correct status instead of returning zero always.
2) ptlrpcd_addref() should not increment ptlrpcd_users on error.
3) Added code in a mdc_setup() and mgc_setup() to test the return
value of ptlrpcd_addref() and return on error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I684b5603b33d469f4e7566d07f52cb49b05c8ec6
Reviewed-on: http://review.whamcloud.com/7522
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1601 ldlm: Fix flock detection for different mounts

Deadlock can happen when 2 processes take concurrent locks
on files situated in different mountpoints.

Modify flock detection algorithm to distinguish process by
pair PID+NID instead of PID+export.
It is done by searching for a blocking owner in all OBD's
exports with the same NID.

Xyratex-bug-id: MRP-449
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>
Change-Id: Ib2969df9b9733af4025e1905caf2378af72c6f18
Reviewed-on: http://review.whamcloud.com/3276
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>