X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lib.c;h=0eb34d786049031a396f8aabda0b7dee98c86c97;hp=1b1c2a6ce3cc62029bf63afc884f2d2cfc1219f7;hb=9849f6110680d6846e05e9787f1821b0f86b5461;hpb=77c40f46f1631212a8ad9f4ff2b3bfc5ca2d8aa0 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 1b1c2a6..0eb34d7 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -369,11 +369,11 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) /* lru for osc. */ INIT_LIST_HEAD(&cli->cl_lru_osc); atomic_set(&cli->cl_lru_shrinkers, 0); - atomic_set(&cli->cl_lru_busy, 0); - atomic_set(&cli->cl_lru_in_list, 0); + atomic_long_set(&cli->cl_lru_busy, 0); + atomic_long_set(&cli->cl_lru_in_list, 0); INIT_LIST_HEAD(&cli->cl_lru_list); client_obd_list_lock_init(&cli->cl_lru_list_lock); - atomic_set(&cli->cl_unstable_count, 0); + atomic_long_set(&cli->cl_unstable_count, 0); init_waitqueue_head(&cli->cl_destroy_waitq); atomic_set(&cli->cl_destroy_in_flight, 0); @@ -1068,8 +1068,10 @@ dont_check_exports: * OBD_CONNECT_MNE_SWAB flag around forever, just so long as we need * interop with unpatched 2.2 clients. For newer clients, servers * will never do MNE swabbing, let the client handle that. LU-1644 */ + spin_lock(&export->exp_lock); export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) && !(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB); + spin_unlock(&export->exp_lock); #endif LASSERT(target->u.obt.obt_magic == OBT_MAGIC); @@ -1806,17 +1808,19 @@ repeat: static struct ptlrpc_request *target_next_replay_req(struct obd_device *obd) { - struct ptlrpc_request *req = NULL; - ENTRY; + struct ptlrpc_request *req = NULL; + ENTRY; - CDEBUG(D_HA, "Waiting for transno "LPD64"\n", - obd->obd_next_recovery_transno); + CDEBUG(D_HA, "Waiting for transno "LPD64"\n", + obd->obd_next_recovery_transno); - if (target_recovery_overseer(obd, check_for_next_transno, - exp_req_replay_healthy)) { - abort_req_replay_queue(obd); - abort_lock_replay_queue(obd); - } + CFS_FAIL_TIMEOUT(OBD_FAIL_TGT_REPLAY_DELAY2, cfs_fail_val); + + if (target_recovery_overseer(obd, check_for_next_transno, + exp_req_replay_healthy)) { + abort_req_replay_queue(obd); + abort_lock_replay_queue(obd); + } spin_lock(&obd->obd_recovery_task_lock); if (!list_empty(&obd->obd_req_replay_queue)) {