LU-1872 ptlrpc: cleanup jobstats in thread context

Since cfs_hash function isn't safe in interrupt context, we should
move the jobstats cleanup work into each stats logging function.

If there are any activities, cleanup will be triggerred on logging
time, and the hash table will be shrinked automatically; If there
isn't any activity, the hash table will stop growing, and it can
be cleared manually.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I1c60e123f67c0ad3b959bbb330282cd07c63a28c
Reviewed-on: http://review.whamcloud.com/3945
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1489 test: lfs data_version is not available prior to 2.3

We need to check lustre version to make sure the test for
new feature does not run on unsupported version

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Iae808413ba4965033d17d53977f647efc533eecc
Reviewed-on: http://review.whamcloud.com/3948
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1808 build: Lustre build does not support FC15.

Change lbuild to support for FC15 and calm down warning message.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I365f708f82c01b0f72aeffa3c09e46800ca770d5
Reviewed-on: http://review.whamcloud.com/3849
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Chris Gearing <chris.gearing@intel.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1799 o2iblnd: debug patch for o2iblnd

IBM reported kernel panic on their BGQ IO node when loading the
ptlrpc module with an o2ib network. The IB interface had an IPv4
and IPv6 address. Removing the IPv6 address avoided the crash.

I suspect rdma_bind_addr can't associate any RDMA device in this
case, this patch will check if there's attached IB device on cmid
even returned value is ZERO, it will also output more information.

Test-Parameters: nettypes=o2ib
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Id44110fcf56b199b1504ab4e6b0157d87bc2d270
Reviewed-on: http://review.whamcloud.com/3815
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1900 test: check for lustre version in sanity-scrub

Since OI scrub only available on lustre 2.3.0, we need
to check if the mds runs at least 2.3.0

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I5ce0462a1deb5bddfec88177a75a1c17b69b5217
Reviewed-on: http://review.whamcloud.com/3947
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1923 lov: verify stripe is on given device

When restarting FIEMAP from a file with many extents, the first
supplied fiemap extent contains the offset of the previous last
extent found.  If this data is invalid, it may cause the LOV code
to acccess out-of-bounds array indices.

Verify data passed from userspace is within bounds.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8e70e891b9f23c8f72aa78a4807369584ac2b04f
Reviewed-on: http://review.whamcloud.com/3962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
LU-1881 oi: not shrink the last entry in OI index node

Shrinking OI index node to recycle idle leaf for the last entry
will cause subsequent lookup/insert ops to access invaild space.
So just keep the last entry there, which can be reused directly
by next new node.

Other fixes:

1) The recycled empty OI blocks should be recorded on divice and
be re-loaded after the device remounted. Then they can be reused
when needs new OI blocks.

2) Need not check iam_container::ic_idle_failed in iam_new_node().

3) Clear iam_frame::at_shifted when iam_path_release().

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I46611c208563a943a0980110b2c416186e6d1249
Reviewed-on: http://review.whamcloud.com/3931
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>