LU-2783 ofd: Implement OBD_IOC_GET_OBJ_VERSION

This patch implements OBD_IOC_GET_OBJ_VERSION for ofd, so that tests
can use "lctl getobjversion" on OST objects.  jt_get_obj_version() now
takes ID and group pairs, as well as FIDs, for OST objects.  Although
the code are for testing purposes only, dereferencing an ioc_inlbuf
without checking its size is still unacceptable.  Hence,
mdt_ioc_version_get() is changed to check sizes first.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: If259aeca281dcb3f4ee4dc719719f722cf72cad4
Reviewed-on: http://review.whamcloud.com/5467
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1187 osd: add remote entry insert for ZFS DNE.

Add remote entry insert in osd_index_insert for DNE on ZFS.

Signed-off-by: Wang Di <di.wang@intel.com>
Change-Id: I4c2337e69e4c4c4754b8ff7995dd69318f3d674d
Reviewed-on: http://review.whamcloud.com/4933
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
LU-2970 lov: wait for active IOs before deleting the object

lov_layout_operations::llo_delete will be called when the file's
layout is going to change or file is being taken out of cache so we
must make sure there is no active IOs on this object.

For layout change case, it's lov_layout_change()'s responsibility to
make sure there is no active IOs before entering into llo_delete.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Id56a66548f9f05555e6d112355d2a71da5ab4705
Reviewed-on: http://review.whamcloud.com/5812
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2682 fid: cleanup direct _id and _seq access

Access/copying the individual _id and _seq fields should be
replaced with the _oi field, and compatibility macros for
accessing the individual fields should be removed.

Signed-off-by: Wang Di <di.wang@intel.com>
Change-Id: Iedce5cfb308c1b6de6aa24872b8c71e7b616b67c
Reviewed-on: http://review.whamcloud.com/5601
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1199 build: Clean out the build directory

Clean up the build directory.  Move in the direction of reserving
"build/" for the special-purpose Makefile that lives there.
Eventually we could rewrite the autoconf tests to eliminate that
Makfile, and the build directory could disappear altogether (after
finding homes for anything else that is left).

The autoconf m4 file move into a top level "config" directory.

Most other things that have moved are put in the new "contrib"
top-level directory.  For instance, "contrib/lbuild" contains
all of the lbuild-related files, and "contrib/git-hooks" contains
the git hooks for lustre developers.

Most of the moved files were unchanged, however the lbuild scripts
needed some tweaking to deal with the new location.

Because of the way that Intel's build farm and git hooks expect to
find certain files in fixed locations I have had to leave a few
symlinks in place that point to the new locations.

Change-Id: I04dc529d4f4060b892e1e4eaa8613bbc3337c414
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5035
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2926 ldiskfs: crash in is_bad_inode() on SLES11 SP2

Fix error handling in ldiskfs_xattr_inode_iget
for SLES11 SP2 platform

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I05568cac5f4cc8a12cfd95034a99b06541289673
Reviewed-on: http://review.whamcloud.com/5709
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2995 osd: Delete the ref of remote parent in del ..

Try to delete remote dir from REMOTE PARENT during delete ..,
because the object might not be destroyed if it is being
opened by someone else, instead it will be inserted to the
ORPHAN dir, so if it does not delete the {.., REMOTE_PARENT},
it will be two parents for this remote dir.

Add remote object FID into op_data->op_fid3, so the stale check
will not fail during remote open.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6bbac9174869ae02f385ac52740bb2046f0f1bab
Reviewed-on: http://review.whamcloud.com/5791
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3038 mgs: clear mti in the end of marker

The target information should be cleared when it met
the end marker of each mdc/osc, otherwise, the information
left over in mti will be brought into the config log of
next target, even worse some target might be identfied
wrongly as failover pair.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I67838914825caf0a9b4da8bc3cdfbb779a6eadd4
Reviewed-on: http://review.whamcloud.com/5851
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>