LU-2781 mdt: initialize mti_spec.sp_rm_entry

Prevent previous assignments to mti_spec.sp_rm_entry from affecting
the current operation by setting it to 0 in mdt_thread_info_init().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iee41cd0e48718338d83b62e0610bd5d23d80dc47
Reviewed-on: http://review.whamcloud.com/5327
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2828 osp: correct osp device finialize order

* Should stop osp precreate thread before releasing its last used
  oid/seq files.

* git commit 71bdcf99 changes the return value of
  writeconf_or_reformat, it's a cleanup function and when writeconf
  does not work it reformat device and should return 0 (success)
  in the end.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I82307dea94bd9ec62088bc931c6b4dd7b90776a0
Reviewed-on: http://review.whamcloud.com/5528
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
LU-2658 llite: too many arguments in generic_file_llseek_size

A generic_file_llseek_size starting kernel 3.5 has 5 arguments.
We need to detect and use with the correct number of arguments.

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I966de37a880a94cde54be84062dec2b91e8334f5
Reviewed-on: http://review.whamcloud.com/5244
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2473 ldiskfs: Reorganize ldiskfs kernel patches

This commit makes no changes to the patches, only moving
their location.

For some time we have supported only a single kernel per major
OS release, e.g. RHEL 6.3, or RHEL 6.2, but not both.  While
it is understandable to only support a single kernel, it is
quite another to intentionally destroy the patchset for the previous
kernel every time we upgrade.

This makes the logistics of upgrading an OS release (even a minor
one like RHEL 6.2 to 6.3, or 6.3 to 6.4) quite complicated.

We should really start a new patch series when we update support
for a new kernel.  That way we can leave the patch sets for
previous kernels in place.  We do not need to "support" them, but
at least leaving them unmolested until the users of the previous
patch set have time to upgrade would be greatly appreciated.

This commit attempts to organize the patches into subdirectories
according to the kernel/os in which they were first created.  A
later commit will then add support for RHEL6.4.

Also, fix build/confirmpatches.sh to allow checking
ldiskfs/kernel_patches (a bug prevent checking anything but the
default).

Extend both confirmpatches.sh and clearpatches.sh to work with
series files that point to patches organized into subdirectories.

Change-Id: I6552fc271fff1f00657ba1430c4a1215dea5b530
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4803
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Reviewed-by: Jeff Mahoney <jeffm@suse.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1812 ext4: ec_type has been dropped from ext4_ext_cache

In short, EXT4_EXT_CACHE_EXTENT is indicated when both
ee_len != 0 and ee_start != 0.

see kernel commit b05e6ae58a13b56e3e11882c1fc71948c9b29760

Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I88bb07c0e09ea13ac17399edb47de8e16f105543
Reviewed-on: http://review.whamcloud.com/4970
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2844 mdd: mdt prepare failure should not oops

If mdd prepare fails, lfsck data may not be initialized, mdd
lfsck stop should check this flag.

Add one test to fail mdt prepare, and system should not oops
upon this failure.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Ie3e81a2a18aedaa47965800881292c122937506a
Reviewed-on: http://review.whamcloud.com/5519
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2548 quota: proper iam index truncation

In quota migration, the iam container needs be reinitialized
after truncation.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I622cc8e4e095cc0c9dcd2d2ce0e245a6de376b3d
Reviewed-on: http://review.whamcloud.com/5292
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1812 ldiskfs: Add kernel patch series for SLES11SP2

Add a kernel patch series for SLES11SP2.

Signed-off-by: James Simmons - <uja.ornl@gmail.com>
Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I5e3902eb90e69c9652cdfbfc0d8ea1d99d15b453
Reviewed-on: http://review.whamcloud.com/4972
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2467 utils: Update wirecheck for new connect flags

This patch adds OBD_CONNECT_PINGLESS to wirecheck and updates
wiretests accordingly.  Also, the connect flag readme comment is
updated to include this as a guidance for adding connect flags in the
future.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I131291dd2dcfda07045a09cbfde4833128464966
Reviewed-on: http://review.whamcloud.com/5269
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1546 mdd: return nlink as zero for dead objects

In mdd_attr_get_internal() check for dead objects and set nlink to
zero accordingly.  Add a sanity check to verify that this works as
expected.

Change-Id: I9dd574cce63bcbf47c9f8f3c7ae6d151c704a45a
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/3154
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>