From f83819dcb05ebe7d154bd5cfb674f5c62b3d968c Mon Sep 17 00:00:00 2001 From: dzogin Date: Thu, 15 Oct 2009 15:16:08 +0000 Subject: [PATCH] Branch b1_8 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 | 5 +++++ lustre/mds/handler.c | 2 +- lustre/mds/mds_reint.c | 15 +++++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 15df089..21454a1 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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 diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index d2e1bca..1112cb7 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -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) diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index c99f525..0c41de0 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -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, -- 1.8.3.1