Whamcloud - gitweb
b=21882 handle SLV==1 on client side
authorVitaly Fertman <Vitaly.Fertman@Sun.COM>
Wed, 10 Feb 2010 16:12:16 +0000 (19:12 +0300)
committerJohann Lombardi <johann@sun.com>
Wed, 10 Feb 2010 18:25:11 +0000 (19:25 +0100)
Initialize ldlm pool SLV to 0 on client side to handle SLV==1 obtained from server correctly

i=rreed
i=adilger

lustre/ldlm/ldlm_pool.c
lustre/ldlm/ldlm_request.c

index 4ef6390..1566c23 100644 (file)
@@ -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;
         }
index 58ccbce..66d94e1 100644 (file)
@@ -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;
 }