LU-5180 lfsck: linkea for orphan

To make the fid2path tools can work against any client visible
object, the LFSCK will generate linkEA not only for the orphan
under the directory /ROOT/.lustre/lost+found/MDTxxxx/ but also
for the objects ".lustre" and ".lustre/lost+found".

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibf957e8e2ec93d0f8f8a7cf1ac45706fb79a41db
Reviewed-on: http://review.whamcloud.com/10733
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
LU-5099 api: transfer object type via dt_insert API

When the LFSCK finds a dangling name entry, it may be required to
re-create the lost remote MDT-object. The LFSCK needs to know the
file type for the re-creating.

Generally, the LFSCK can get the file type from the name entry.
Unfortunately, when we insert the name entry into the directory
via dt_insert(), the sponsor does not transfer the object type.
It is not a problem for local case, because the OSD can get the
file type internally via checking the MDT-object directly. But
for remote case, when the OSD handles insert locally for remote
object, it cannot get the remote object type. On the other hand,
in DNE I, only directory can be remote, the OSD can assume that
the file type is S_IFDIR. But such assumption will be wrong when
enable remote object for normal file and will misguide the LFSCK
to re-create worng MDT-object.

This patch enhances the dt_insert() and dt_declare_insert() API
parameter to allow the insert operation sponsor to transfer the
file type directly.

The patch also changes the wire protocol for OUT_INDEX_INSERT
to transfer file type from one MDT to another.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I26a3b183f8c47a5e834a9708ae49c96d282b0067
Reviewed-on: http://review.whamcloud.com/10447
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4871 newline: Correct missing newline

Several error messages are missing newline characters
at the end of the message. Newlines are added where
necessary and other minor corrections; no punctuation
at the end of an error message, add a return code to
the end of error messages, device name at the beginning,
etc.

There are just a couple of places where newlines are
removed and this is only in LDLM_DEBUG_NOLOCK. The definition
of LDLM_DEBUG_NOLOCK already has a newline in it and
resulted in double newlines printed.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I562a76a03753cfc8fd7bb822713280995d9cce45
Reviewed-on: http://review.whamcloud.com/10000
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4993 libcfs: convert nodemask_t to linux bitmask

Starting in 3.14 kernels nodemask_t was changed from a
a unsigned long to a linux bitmap so more than 32 cores
could be supported. Using set_bit in cfs_cpt_table_alloc
no longer compiles so this patch backports bits of the
node management function that use a linux bitmap back
end. Cleaned up libcfs bitmap.h to use the libcfs layers
memory allocation function. This was pulling in lustre
related code that was not defined.

Change-Id: I7d08425bc09af2c3c04f7e5ed7d50e7c27d165df
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10332
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4975 ofd: add comments for ofd_grant.c functions

- Fix up GPL header block to reference proper GPLv2 license URL.
- Remove mention of contacting Sun.
- Add introductionary comment block for the ofd_grant.c file.
- Add function comments blocks to all functions in the ofd_grant.c
  file

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I51400354ae51a2d989f136c7dad389d88193a2e5
Reviewed-on: http://review.whamcloud.com/10586
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4478 ldiskfs: fix problem when ldiskfs_acct_on() fails

ldiskfs_fill_super() does not handle the failure ldiskfs_acct_on()
returns correctly. This patch fixes the problem for RHEL6.5 kernel.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Id6e9af30ac81b54c2873b8c2f2a8efd398398a8d
Reviewed-on: http://review.whamcloud.com/10938
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>