Whamcloud - gitweb
b=21882 handle SLV==1 on client side
authorVitaly Fertman <Vitaly.Fertman@Sun.COM>
Thu, 11 Feb 2010 20:39:33 +0000 (12:39 -0800)
committerRobert Read <rread@sun.com>
Thu, 11 Feb 2010 20:39:33 +0000 (12:39 -0800)
Initialize ldlm pool SLV to 0 on client side to handle SLV==1 obtained from server correctly

i=reen
i=adilger

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

index 4b92fcb..0ed45c6 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 7b55b01..4c7c2f0 100644 (file)
@@ -1345,7 +1345,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;
 }