Move client's import destruction from disconnect to cleanup phase
The patch allows to use connect after disconnect.
Xyratex-bug-id: MRP-288
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I984660a2917a7e4d5c95cd8288dd6974a7c3ccba
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1963
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ptlrpc_free_rq_pool(imp->imp_rq_pool);
imp->imp_rq_pool = NULL;
}
- class_destroy_import(imp);
+ client_destroy_import(imp);
obd->u.cli.cl_import = NULL;
}
cfs_up_write(&obd->u.cli.cl_sem);
sptlrpc_import_sec_put(imp);
class_import_put(imp);
}
+EXPORT_SYMBOL(client_destroy_import);
/* configure an RPC client OBD device
*
ldlm_namespace_free_post(obddev->obd_namespace);
obddev->obd_namespace = NULL;
+ LASSERT(obddev->u.cli.cl_import == NULL);
+
ldlm_put_ref();
RETURN(0);
}
ptlrpc_invalidate_import(imp);
- if (imp->imp_rq_pool) {
- ptlrpc_free_rq_pool(imp->imp_rq_pool);
- imp->imp_rq_pool = NULL;
- }
- client_destroy_import(imp);
- cli->cl_import = NULL;
-
EXIT;
out_disconnect:
*/
static void obd_zombie_import_add(struct obd_import *imp) {
LASSERT(imp->imp_sec == NULL);
+ LASSERT(imp->imp_rq_pool == NULL);
cfs_spin_lock(&obd_zombie_impexp_lock);
LASSERT(cfs_list_empty(&imp->imp_zombie_chain));
zombies_count++;