MRP-484 ucred: ucred cleanup, part2

As echo client may be sitting on mdd it needs to initialize md_ucred
too. As echo client may be sitting on osc without mdd module loaded,
make md_ucred a common key, move it to lu_object.

Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I9c4aaa31148ff10e4a609393a0cf018cdf731d9c
LU-1370 obdecho: few fixes about md_echo clients

1. Remove LU_NOREF flag from echo client ctxt, because it
conflicts with cl ctxt(which has no NOREF flag). So if
echo_client and normal lustre client share the same context
cache, this flag will cause echo module refcount not being
dropped.

2. Ma_lmm_size in ma will be changed during mdd_xxx,
so we can not use that to free the ma_lmm.

3. Remove lu_device from linkage on lu_site during cleanup
 phase.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: I08fec689ef9c8b64284f7400ab0fc4dc362ebf87
Reviewed-on: http://review.whamcloud.com/2784
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1082 test: create test for mds-survey

Create a mds-survey.sh test with two test cases
1. test without stripe count
2. test with stripe count
Create test_224[a|b] for quick run on metadata survey

Notice, we remove all clients before testing
because the real client and echo_client share
the same client object memory

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I453ac34d8b6019e109be5d89d482300d31571f93
Reviewed-on: http://review.whamcloud.com/2156
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-1227 tests: mds-survey.sh should check ost's space

When we run the test with stripe_count=1, we need to
reduce the file_count to be the min of both mdt's inode
and ost's inode

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I04a558c277ebf9a1e1526a7d507faab8b66e740c
Reviewed-on: http://review.whamcloud.com/2372
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1561 tests: Fix ALWAYS_EXCEPT in mds-survey.sh

Modifying the ALWAYS_EXCEPT assignment in mds-survey.sh does not take
effect, because the test filters have already been built.  This patch
moves the build_test_filter() call below the ALWAYS_EXCEPT assignment.
Also moved downward is the check_and_setup_lustre() call, which
usually goes after environment checks.

Test-Parameters: testlist=mds-survey
Change-Id: I547310e4fccfaaa4fbe7010e14baefa2ab9bbdd4
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3183
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1548 mdssurvey: fix file_count in mds_survey

It should use file_count_per_thread in lctl command,
instead of file_count directly.

Signed-off-by: Wang di <di.wang@whamcloud.com>
Change-Id: I606a988db373c1065544385fdd1dfd42821eef2b
Reviewed-on: http://review.whamcloud.com/3549
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>