X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lib.c;h=83ad3c22c9e3c7a13bfb3d6f0309bf5915c09ec5;hb=7ce2000eb0f4e7b7ea1f362c17099881098cfef7;hp=0d514db4a2e3c71806edfa418d95caddab6d1211;hpb=b62d166a8a43a6ec06074b45107d78c5dc8db4bf;p=fs%2Flustre-release.git diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 0d514db..83ad3c2 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -46,7 +46,7 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf) int rq_portal, rp_portal, connect_op; char *name = obddev->obd_type->typ_name; char *mgmt_name = NULL; - int rc = 0; + int rc; struct obd_device *mgmt_obd; mgmtcli_register_for_events_t register_f; ENTRY; @@ -102,16 +102,17 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf) INIT_LIST_HEAD(&cli->cl_cache_waiters); INIT_LIST_HEAD(&cli->cl_loi_ready_list); INIT_LIST_HEAD(&cli->cl_loi_write_list); + INIT_LIST_HEAD(&cli->cl_loi_read_list); spin_lock_init(&cli->cl_loi_list_lock); cli->cl_brw_in_flight = 0; spin_lock_init(&cli->cl_read_rpc_hist.oh_lock); spin_lock_init(&cli->cl_write_rpc_hist.oh_lock); spin_lock_init(&cli->cl_read_page_hist.oh_lock); spin_lock_init(&cli->cl_write_page_hist.oh_lock); - cli->cl_max_pages_per_rpc = PTL_MD_MAX_PAGES; + cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES; cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT; - ldlm_get_ref(); + rc = ldlm_get_ref(); if (rc) { CERROR("ldlm_get_ref failed: %d\n", rc); GOTO(err, rc); @@ -313,7 +314,7 @@ int client_disconnect_export(struct obd_export *exp, int failover) /* Yeah, obd_no_recov also (mainly) means "forced shutdown". */ if (obd->obd_no_recov) - ptlrpc_invalidate_import(imp); + ptlrpc_invalidate_import(imp, 0); else rc = ptlrpc_disconnect_import(imp); @@ -405,8 +406,19 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) obd_str2uuid (&cluuid, str); /* XXX extract a nettype and format accordingly */ - snprintf(remote_uuid.uuid, sizeof remote_uuid, - "NET_"LPX64"_UUID", req->rq_peer.peer_nid); + switch (sizeof(ptl_nid_t)) { + /* NB the casts only avoid compiler warnings */ + case 8: + snprintf(remote_uuid.uuid, sizeof remote_uuid, + "NET_"LPX64"_UUID", (__u64)req->rq_peer.peer_nid); + break; + case 4: + snprintf(remote_uuid.uuid, sizeof remote_uuid, + "NET_%x_UUID", (__u32)req->rq_peer.peer_nid); + break; + default: + LBUG(); + } spin_lock_bh(&target->obd_processing_task_lock); abort_recovery = target->obd_abort_recovery; @@ -701,7 +713,6 @@ void target_start_recovery_timer(struct obd_device *obd, svc_handler_t handler) obd->obd_recovery_handler = handler; obd->obd_recovery_timer.function = target_recovery_expired; obd->obd_recovery_timer.data = (unsigned long)obd; - init_timer(&obd->obd_recovery_timer); spin_unlock_bh(&obd->obd_processing_task_lock); reset_recovery_timer(obd);