LU-5516 lfsck: repair orphan parent MDT-object

When the namespace LFSCK tries to repair the missing name entry,
means inserting the lost name entry back to its parent directory,
it may find that the parent MDT-object is also lost. Under such
case, the namespace LFSCK will firstly create the missing parent
MDT-object as an orphan and insert into the
.lustre/lost+found/MDTxxxx/ directory with the name:
${FID}-P-${conflict_version}.

Then insert the lost name entry into the orphan parent according
to the MDT-object's linkEA.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie9c585f08fa9f371fa3ed1281c9c814606c4a2ea
Reviewed-on: http://review.whamcloud.com/11391
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5506 lfsck: skip orphan MDT-object handling for failed MDTs

The namespace LFSCK will record the failed MDTs in the LFSCK tracing
file (lfsck_namespace) during the first-stage scanning, then when it
moves to the second-stage scanning, it can know which (the failed)
MDT(s) contain the MDT-objects that may have un-verified name entries
on other MDTs. Then the LFSCK will skip the orphan MDT-objects
handling on those ever failed MDTs. But other MDTs can be handled as
normal case without affected by the failed MDTs.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic53d2fa24f81fb918d130dbc27694d3b68dc19d6
Reviewed-on: http://review.whamcloud.com/11444
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2456 lnet: DLC user space Configuration library

This is the seventh patch of a set of patches that enables DLC.

This patch adds a user space library liblnetconfig, which provides
an API to add/delete/show LNET parameters.  This library has been
added to the /lnet/utils/lnetconfig directory.

There are two sets of APIs which are presented.  There are the
APIs which configure a specific parameter such as routes, and
there are a set of APIs which take in a YAML block of entities
which are then added/deleted/showed.  The latter is intended for
use by IML or other similar tools.

All APIs return a cYAML error block, and the show APIs return a
cYAML show block as well.  The cYAML block is a structural
represenation of a YAML block.  This can be stored/queried/printed
and deleted by the caller of the API.  A cYAML API is provided
to facilitate these operations

DLC can be enabled via --enable-dlc or disabled via --disable-dlc
parameters passed to configure.  DLC is by default enabled.
If the yaml library is installed and --enable-dlc is set then
dlc is added to the build, otherwise if libyaml is not installed
or --disable-dlc is set then dlc is not added to the build.

When building the rpm, this configure options are used to decide
to add the Require and BuildRequire conditions or not.

Currently SLES doesn't include libyaml package so it will need
to be installed manually if users want to build DLC

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id6f7eeff8c63ab3f3b27fca92dc31066f7b87968
Reviewed-on: http://review.whamcloud.com/8025
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2456 lnet: DLC user space Configuration utility

This is the eighth patch of a set of patches that enables DLC.

This patch adds an lnet configuration utility, lnetctl,
which provides a way for sys admins to configure LNET
parameters.  This utility has been added to the /lnet/utils
directory

The utility is built only if libyaml is installed on the
system.

For SLES libyaml is not available, so if DLC is to be
built libyaml has to be installed manually.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I81e8eef3452af0e7a246ca78213dd1a2d4b59775
Reviewed-on: http://review.whamcloud.com/8026
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2456 lnet: configure lnet on startup

This is the ninth patch of a set of patches that enables DLC.

Modified lustre/scripts/lnet to look for a default config file
/etc/sysconfig/lnet.conf.  If it's found and the lnetctl utility
is installed, then call lnetctl with that file as a parameter.

This file is expected to be in YAML format and it defines
LNET configuration items.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I32252abfddeaefd43359c7055a5476b2bc8eda92
Reviewed-on: http://review.whamcloud.com/11798
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2456 lnet: lnetctl utility man page

Added the man page for the lnetctl utility

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id3b0345b29d8cd891d89283632a1cb66eb2d400a
Reviewed-on: http://review.whamcloud.com/11859
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 libcfs: ignore CDEBUG_ENTRY_EXIT for userspace

In userspace define GOTO() and RETURN() to not call libcfs_log_goto()
or libcfs_log_return(). Remove the definition of uses of the obsolete
__arch_lib__ symbol.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I55411d57e0cb00e3e742b011317244b452c23f6a
Reviewed-on: http://review.whamcloud.com/12281
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5706 tests: Ensure preconditions in conf-sanity/57

The modules need to be loaded to read any data, but the system does
not need to be mounted.  Loading modules prevents any skipped tests
causing this one to fail.

Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=conf-sanity envdefinitions="CONF_SANITY_EXCEPT=56"
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Idf7003067c6ea9f33203f219f5b370008a43fafd
Reviewed-on: http://review.whamcloud.com/12236
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>