Whamcloud - gitweb
- Change an LDLM LBUG into just a warning, now that it can happen with local
authorpschwan <pschwan>
Wed, 2 Oct 2002 19:53:50 +0000 (19:53 +0000)
committerpschwan <pschwan>
Wed, 2 Oct 2002 19:53:50 +0000 (19:53 +0000)
locks.  The warning will eventually be removed, but I want to know where it's
happening before I do that.

lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_request.c

index 9e03318..eb72514 100644 (file)
@@ -415,10 +415,10 @@ void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode)
          * run the callback. */
         if (!lock->l_readers && !lock->l_writers &&
             (lock->l_flags & LDLM_FL_CBPENDING)) {
-                if (!lock->l_resource->lr_namespace->ns_client) {
-                        CERROR("LDLM_FL_CBPENDING set on non-local lock!\n");
-                        LBUG();
-                }
+                if (!lock->l_resource->lr_namespace->ns_client &&
+                    lock->l_export)
+                        CERROR("FL_CBPENDING set on non-local lock--just a "
+                               "warning\n");
 
                 LDLM_DEBUG(lock, "final decref done on cbpending lock");
                 l_unlock(&lock->l_resource->lr_namespace->ns_lock);
index 08f285a..97c5859 100644 (file)
@@ -122,11 +122,12 @@ static int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
         int err;
 
         if (ns->ns_client) {
-                CERROR("Trying to cancel local lock\n");
+                CERROR("Trying to enqueue local lock in a shadow namespace\n");
                 LBUG();
         }
 
-        lock = ldlm_lock_create(ns, parent_lockh, res_id, type, mode, data, data_len);
+        lock = ldlm_lock_create(ns, parent_lockh, res_id, type, mode, data,
+                                data_len);
         if (!lock)
                 GOTO(out_nolock, err = -ENOMEM);
         LDLM_DEBUG(lock, "client-side local enqueue handler, new lock created");