From: Vitaly Fertman Date: Wed, 10 Feb 2010 16:12:16 +0000 (+0300) Subject: b=21882 handle SLV==1 on client side X-Git-Tag: v1_8_2_50~15 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=781611dd7df44d83fe9057566942044496735476;p=fs%2Flustre-release.git b=21882 handle SLV==1 on client side Initialize ldlm pool SLV to 0 on client side to handle SLV==1 obtained from server correctly i=rreed i=adilger --- diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c index 4ef6390..1566c23 100644 --- a/lustre/ldlm/ldlm_pool.c +++ b/lustre/ldlm/ldlm_pool.c @@ -870,7 +870,7 @@ int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns, pl->pl_server_lock_volume = ldlm_pool_slv_max(LDLM_POOL_HOST_L); } else { ldlm_pool_set_limit(pl, 1); - pl->pl_server_lock_volume = 1; + pl->pl_server_lock_volume = 0; pl->pl_ops = &ldlm_cli_pool_ops; pl->pl_recalc_period = LDLM_POOL_CLI_DEF_RECALC_PERIOD; } diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index 58ccbce..66d94e1 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -1233,7 +1233,7 @@ static ldlm_policy_res_t ldlm_cancel_lrur_policy(struct ldlm_namespace *ns, /* Inform pool about current CLV to see it via proc. */ ldlm_pool_set_clv(pl, lv); - return (slv == 1 || lv < slv) ? + return (slv == 0 || lv < slv) ? LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK; }