MRP-881 ptlrpc: fix put export for hp request

Fix for ASSERTION(cfs_list_empty(&exp->exp_hp_rpcs)) failed.

The root cause is in target_handle_connect()
        if (req->rq_export != NULL)
                class_export_put(req->rq_export);

        /* request takes one export refcount */
        req->rq_export = class_export_get(export);

For previous export it release export reference, but
rq_exp_list still in exp_hp_rpcs queue, after connect
requests became hp requsts. ptltpc_handle_request put last
reference for export and export go to zombie list with non
empty exp_hp_rpcs.
This patch add rq_exp_list move to new export at
target_handle_connect(), and cleanup for MRP-649.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: Ie159bd7978d77d9c64f4e54f178423eab37d0765
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/299
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-814 tests: combine dependent sanity tests

Some tests can not run as expected when previous dependent test is not
ran.
This patch combines the following sanity tests:
  tests 1a, 1b to test 1, test 4 is removed as duplicate of new test 1
  tests 2a, 2b to test 2, test 3 is removed as duplicate of new test 2
  tests 3a, 3b, 3c to test 3
  tests 4a, 4b to test 4
  tests 6a, 6b to test 6a
  tests 6c, 6d to test 6c
  tests 6e, 6f to test 6e
For the changed tests $tfile and $tdir are used for test file and dir
names.
Error exit messages are added to indicate what went wrong.
Test 0 is renamed to test 0a to allow running it separately.

Signed-off-by: Vladimir Saveliev <vladimir_saveliev@xyratex.com>
Change-Id: If79acff4e4eec948ee42382c90c9a8f60bb3ce03
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/301
Tested-by: Jenkins
Reviewed-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Tested-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-509 obdclass: correct shutdown

add zombie barrier in 2 places:
1) echo_device_fini, it is possible the echo connect method is called
and echo is connected to some upper layer; as class_manual_cleanup()
is not called for echo, we are cleaning up from bottom to top, i.e.
zombee barrier in the bottom layer is not enough;

2) class_detach, it is possible that next setup starts before previous
cleanup finishes, we need to wait for all the self-exports to die;

also avoid use after free in class_handle_ioctl for obd_device found by index or name

Change-Id: I3cbf78c9000973190ab97b3d2a8ea5c2280c33b1
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/gerrit/166
Tested-by: Jenkins
Reviewed-by: Artem Blagodarenko <Artem_Blagodarenko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>