X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lib.c;h=70bd9b7867e19629e0a56912a62bcb3903eb082b;hb=1953af5737416c8ec7c73fad685e5c2663bb090a;hp=50f2f97b26875ace7b0692b196b1e5f5167f7faa;hpb=ac606470fe01743b1af98b29c07cadbd792c9614;p=fs%2Flustre-release.git diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 50f2f97..70bd9b7 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -245,10 +245,13 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf) 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); - - if (num_physpages <= 32768) { /* <= 128 MB */ - cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 3; - cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 3; + + if (num_physpages >> (20 - PAGE_SHIFT) <= 128) { /* <= 128 MB */ + cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 4; + cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 4; + } else if (num_physpages >> (20 - PAGE_SHIFT) <= 512) { /* <= 512 MB */ + cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 2; + cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 2; } else { cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES; cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT; @@ -417,7 +420,7 @@ out_sem: return rc; } -int client_disconnect_export(struct obd_export *exp, int flags) +int client_disconnect_export(struct obd_export *exp, unsigned long flags) { struct obd_device *obd = class_exp2obd(exp); struct client_obd *cli = &obd->u.cli; @@ -455,7 +458,9 @@ int client_disconnect_export(struct obd_export *exp, int flags) obd->obd_namespace = NULL; } - /* Yeah, obd_no_recov also (mainly) means "forced shutdown". */ + /* + * Yeah, obd_no_recov also (mainly) means "forced shutdown". + */ if (obd->obd_no_recov) ptlrpc_invalidate_import(imp, 0); else @@ -1177,7 +1182,6 @@ int target_queue_recovery_request(struct ptlrpc_request *req, if (obd->obd_recovery_data.trd_processing_task == current->pid || transno < obd->obd_next_recovery_transno) { /* Processing the queue right now, don't re-add. */ - lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT); LASSERT(list_empty(&req->rq_list)); spin_unlock_bh(&obd->obd_processing_task_lock); return 1;