Whamcloud - gitweb
b=9879
authorgreen <green>
Tue, 6 Dec 2005 10:35:59 +0000 (10:35 +0000)
committergreen <green>
Tue, 6 Dec 2005 10:35:59 +0000 (10:35 +0000)
Return error to client if it requests inode bits locks and we believe it
does not support such locks.

lustre/ldlm/ldlm_lockd.c

index 846feee..80d55f0 100644 (file)
@@ -709,6 +709,13 @@ int ldlm_handle_enqueue(struct ptlrpc_request *req,
                 GOTO(out, rc = -EFAULT);
         }
 
+        if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) &&
+            dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) {
+                DEBUG_REQ(D_ERROR, req, "Ibits lock request from unaware "
+                          "client?\n");
+                GOTO(out, rc = -EPROTO);
+        }
+
         /* INODEBITS_INTEROP: Perform conversion from plain lock to
          * inodebits lock if client does not support them.
          */