X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lib.c;h=6b1878182c4046a11cf1e14f355776dba3e4e2b5;hp=961faeabd8a2307b6f803a58643a7ff454ca2747;hb=911b6167a37c2dba835baab4e100dcf206c03113;hpb=0bdd2c864c26e6f48c57505aa6e4143bf1497833 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 961faea..6b18781 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -370,6 +370,7 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) cfs_atomic_set(&cli->cl_lru_in_list, 0); CFS_INIT_LIST_HEAD(&cli->cl_lru_list); client_obd_list_lock_init(&cli->cl_lru_list_lock); + cfs_atomic_set(&cli->cl_unstable_count, 0); init_waitqueue_head(&cli->cl_destroy_waitq); cfs_atomic_set(&cli->cl_destroy_in_flight, 0); @@ -472,15 +473,16 @@ EXPORT_SYMBOL(client_obd_setup); int client_obd_cleanup(struct obd_device *obddev) { - ENTRY; + ENTRY; - ldlm_namespace_free_post(obddev->obd_namespace); - obddev->obd_namespace = NULL; + ldlm_namespace_free_post(obddev->obd_namespace); + obddev->obd_namespace = NULL; - LASSERT(obddev->u.cli.cl_import == NULL); + obd_cleanup_client_import(obddev); + LASSERT(obddev->u.cli.cl_import == NULL); - ldlm_put_ref(); - RETURN(0); + ldlm_put_ref(); + RETURN(0); } EXPORT_SYMBOL(client_obd_cleanup); @@ -1995,8 +1997,8 @@ static int target_recovery_thread(void *arg) thread->t_env = env; thread->t_id = -1; /* force filter_iobuf_get/put to use local buffers */ env->le_ctx.lc_thread = thread; - thread->t_data = NULL; - thread->t_watchdog = NULL; + tgt_io_thread_init(thread); /* init thread_big_cache for IO requests */ + thread->t_watchdog = NULL; CDEBUG(D_HA, "%s: started recovery thread pid %d\n", obd->obd_name, current_pid()); @@ -2091,9 +2093,10 @@ static int target_recovery_thread(void *arg) trd->trd_processing_task = 0; complete(&trd->trd_finishing); - OBD_FREE_PTR(thread); - OBD_FREE_PTR(env); - RETURN(rc); + tgt_io_thread_done(thread); + OBD_FREE_PTR(thread); + OBD_FREE_PTR(env); + RETURN(rc); } static int target_start_recovery_thread(struct lu_target *lut,