Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Fri, 22 Sep 2006 09:54:32 +0000 (09:54 +0000)
committerwangdi <wangdi>
Fri, 22 Sep 2006 09:54:32 +0000 (09:54 +0000)
For cross-ref object, UPDATE lock and LOOKUP lock can not retrieve at same time.
so we can not try to match them both on client

lustre/mdc/mdc_locks.c

index 43f9dbc..6299807 100644 (file)
@@ -628,9 +628,12 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data,
                 /* As not all attributes are kept under update lock, e.g. 
                    owner/group/acls are under lookup lock, we need both 
                    ibits for GETATTR. */
+                /* For CMD, UPDATA lock and LOOKUP lock can not be got 
+                 * at the same for cross-object, so we can not match 
+                 * the 2 lock at the same time FIXME: but how to handle
+                 * the above situation */
                 policy.l_inodebits.bits = (it->it_op == IT_GETATTR) ?
-                        MDS_INODELOCK_UPDATE | MDS_INODELOCK_LOOKUP :
-                        MDS_INODELOCK_LOOKUP;
+                        MDS_INODELOCK_UPDATE : MDS_INODELOCK_LOOKUP;
 
                 rc = ldlm_lock_match(exp->exp_obd->obd_namespace,
                                      LDLM_FL_BLOCK_GRANTED, &res_id,