Whamcloud - gitweb
Branch b1_8
authordzogin <dzogin>
Thu, 15 Oct 2009 15:16:08 +0000 (15:16 +0000)
committerdzogin <dzogin>
Thu, 15 Oct 2009 15:16:08 +0000 (15:16 +0000)
b=20200
i=alexey.lyashkov
i=adilger
i=dmitry.zogin
----------------------------------------------------------------------
Modified Files:
Tag: b1_8
lustre/ChangeLog lustre/mds/handler.c lustre/mds/mds_reint.c
----------------------------------------------------------------------
Description: Fix mds_shrink_intent_reply()/mds_intent_policy() to pass correct
     arguments and prevent LBUG() in lustre_shrink_reply_v2().

lustre/ChangeLog
lustre/mds/handler.c
lustre/mds/mds_reint.c

index 15df089..21454a1 100644 (file)
@@ -11,6 +11,11 @@ tbd Sun Microsystems, Inc.
        * Recommended e2fsprogs version: 1.41.6.sun1
 
 Severity   : normal
+Bugzilla   : 20020
+Description: Fix mds_shrink_intent_reply()/mds_intent_policy() to pass correct
+            arguments and prevent LBUG() in lustre_shrink_reply_v2().
+
+Severity   : normal
 Bugzilla   : 19689
 Description: Change tunefs.lustre and mkfs.lustre --mountfsoptions so that
              exactly the specified mount options are used.  Leaving off
index d2e1bca..1112cb7 100644 (file)
@@ -2397,7 +2397,7 @@ static int mds_intent_policy(struct ldlm_namespace *ns,
         LDLM_DEBUG(lock, "intent policy, opc: %s", ldlm_it2str(it->opc));
 
         if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) &&
-            (it->opc & (IT_OPEN | IT_GETATTR | IT_LOOKUP)))
+            (it->opc & (IT_OPEN | IT_GETATTR | IT_LOOKUP | IT_READDIR)))
                 /* we should never allow OBD_CONNECT_ACL if not configured */
                 repsize[repbufcnt++] = LUSTRE_POSIX_ACL_MAX_SIZE;
         else if (it->opc & IT_UNLINK)
index c99f525..0c41de0 100644 (file)
@@ -1856,10 +1856,17 @@ void mds_shrink_body_reply(struct ptlrpc_request *req,
 void mds_shrink_intent_reply(struct ptlrpc_request *req,
                              int opc, int reply_mdoff)
 {
-        if (opc == REINT_UNLINK || opc == REINT_RENAME ||
-            opc == REINT_OPEN)
-                mds_shrink_reply(req, reply_mdoff, 1, 1);
-
+        switch (opc) {
+                case REINT_UNLINK:
+                case REINT_RENAME:
+                        mds_shrink_reply(req, reply_mdoff, 1, 1);
+                        break;
+                case REINT_OPEN:
+                        mds_shrink_reply(req, reply_mdoff, 1, 0);
+                        break;
+                default:
+                        break;
+        }
 }
 
 static int mds_reint_unlink(struct mds_update_record *rec, int offset,