Whamcloud - gitweb
- Pass flags into lock policy function
authorpschwan <pschwan>
Mon, 28 Oct 2002 01:18:30 +0000 (01:18 +0000)
committerpschwan <pschwan>
Mon, 28 Oct 2002 01:18:30 +0000 (01:18 +0000)
lustre/include/linux/lustre_dlm.h
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_lock.c
lustre/mds/handler.c

index 791f425..187605f 100644 (file)
@@ -159,7 +159,7 @@ struct ldlm_lock {
 
 typedef int (*ldlm_res_compat)(struct ldlm_lock *child, struct ldlm_lock *new);
 typedef int (*ldlm_res_policy)(struct ldlm_lock *lock, void *req_cookie,
-                               ldlm_mode_t mode, void *data);
+                               ldlm_mode_t mode, int flags, void *data);
 
 #define LDLM_PLAIN       10
 #define LDLM_EXTENT      11
@@ -267,7 +267,8 @@ do {                                                                          \
 
 /* ldlm_extent.c */
 int ldlm_extent_compat(struct ldlm_lock *, struct ldlm_lock *);
-int ldlm_extent_policy(struct ldlm_lock *, void *, ldlm_mode_t, void *);
+int ldlm_extent_policy(struct ldlm_lock *, void *, ldlm_mode_t, int flags,
+                       void *);
 
 /* ldlm_lockd.c */
 int ldlm_handle_enqueue(struct ptlrpc_request *req);
@@ -277,7 +278,7 @@ int ldlm_del_waiting_lock(struct ldlm_lock *lock);
 
 /* ldlm_lock.c */
 void ldlm_register_intent(int (*arg)(struct ldlm_lock *lock, void *req_cookie,
-                                     ldlm_mode_t mode, void *data));
+                                     ldlm_mode_t mode, int flags, void *data));
 void ldlm_unregister_intent(void);
 void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh);
 struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *, int strict);
index 1f952cd..468eb2b 100644 (file)
@@ -68,7 +68,7 @@ static void policy_internal(struct list_head *queue, struct ldlm_extent *req_ex,
 
 /* apply the internal policy by walking all the lists */
 int ldlm_extent_policy(struct ldlm_lock *lock, void *req_cookie,
-                       ldlm_mode_t mode, void *data)
+                       ldlm_mode_t mode, int flags, void *data)
 {
         struct ldlm_resource *res = lock->l_resource;
         struct ldlm_extent *req_ex = req_cookie;
index 7e0e93c..2bf4fa7 100644 (file)
@@ -108,7 +108,7 @@ ldlm_res_policy ldlm_res_policy_table[] = {
 };
 
 void ldlm_register_intent(int (*arg) (struct ldlm_lock * lock, void *req_cookie,
-                                      ldlm_mode_t mode, void *data))
+                                      ldlm_mode_t mode, int flags, void *data))
 {
         ldlm_res_policy_table[LDLM_MDSINTENT] = arg;
 }
@@ -678,7 +678,7 @@ ldlm_error_t ldlm_lock_enqueue(struct ldlm_lock * lock,
         if (!local && !(*flags & LDLM_FL_REPLAY) &&
             (policy = ldlm_res_policy_table[res->lr_type])) {
                 int rc;
-                rc = policy(lock, cookie, lock->l_req_mode, NULL);
+                rc = policy(lock, cookie, lock->l_req_mode, *flags, NULL);
 
                 if (rc == ELDLM_LOCK_CHANGED) {
                         res = lock->l_resource;
index 4629542..57919c6 100644 (file)
@@ -1302,7 +1302,7 @@ static int mds_cleanup(struct obd_device *obddev)
 }
 
 static int ldlm_intent_policy(struct ldlm_lock *lock, void *req_cookie,
-                              ldlm_mode_t mode, void *data)
+                              ldlm_mode_t mode, int flags, void *data)
 {
         struct ptlrpc_request *req = req_cookie;
         int rc = 0;