LU-56 lnet: parse RC ping in event callback

In current LNet, we don't parse router-checker ping in EQ callback,
NI information from remote side is attached on peer and it's parsed
for each sending. This is OK for now but with upcoming SMP
improvements, the global LNET_LOCK is removed and EQ callback and
peer/router are proteced by different locks, which means sink buffer
of RC ping could be in progressing of change when other thread is
reading it in lnet_send(), and get wrong information.

This patch will parse ping information in EQ callback, and store it
in a new member lnet_route_t::lr_downis which is just a integer,
although reader in lnet_send() still don't have lock while reading
it, but it's OK because it's just an integer and reader can
atomically read reliable result even w/o any lock.

It should also be a little faster than original implememtation
because we don't have to parse RC ping, which should be updated
once for many seconds, for each sending.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5b89fabfd22f22ba171ef63d30da2d32e2788b16
Reviewed-on: http://review.whamcloud.com/2932
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-56 lnet: eliminate a few locking dance in LNet

This patch gets rid of a few unnecessary locking dance from
LNet, also changed type of lnet_ni_t::ni_last_alive from jiffy to
second because per-second checking should be good enough.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I0e3269f0a5ae0cfecd9611584d5e213a670e38f6
Reviewed-on: http://review.whamcloud.com/2933
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-56 lnet: LNet message event cleanup

In current version, LNet message events are assigned at many places,
it's not easy to maintain, also, assignments of some fields of event
need to be protected by lock and some don't need, this will be a
problem for upcoming LNet SMP improvements.
This patch created a new function lnet_build_msg_event(), all events
are assigned inside this function and it can be called w/o lock
protection.
This is an intermediate patch for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ief8722a15d17909e3844149c55d24fb22ed0c04c
Reviewed-on: http://review.whamcloud.com/2983
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1305 obdclass: lprocfs helpers

few lprocfs helpers to dump statfs data via OSD API

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If90c410c9155f480baa8d344a670cc1a48077f07
Reviewed-on: http://review.whamcloud.com/3089
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1305 osd: procfs support for osd-zfs

procfs support

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I599d1317f762b50965f760a590f2f99ffd86bef5
Reviewed-on: http://review.whamcloud.com/2965
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1030 test: delete test file at the end of test script

At sanity.sh:test_49, we need to delete the test file after test is
finished otherwise the following test cases may fail due to lack of
storage capacity.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Iec9e93f1a4844156345608bf9f7a9bf679b36253
Reviewed-on: http://review.whamcloud.com/3158
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>