From 06db8e7ca950845066c8396cc21d9d652869e3da Mon Sep 17 00:00:00 2001 From: shadow Date: Thu, 20 Aug 2009 16:00:52 +0000 Subject: [PATCH] correctly send lsm on open replay Branch b_release_1_8_1 b=19934 i=tappro i=panda --- lustre/ChangeLog | 6 ++++++ lustre/mdc/mdc_locks.c | 6 +++++- lustre/mds/mds_open.c | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index ae45d8b..5dc83ec 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -16,6 +16,12 @@ TBD Sun Microsystems, Inc. used in production. Severity : normal +Bugzilla : 19934 +Description: correctly send lsm on open replay +Details : MDS is trust to LSM size on replay open, but client can set wrong size + of lsm buffer. + +Severity : normal Bugzilla : 20321 Description: Deadlock between filter_destroy() and filter_commitrw_write(). Details : filter_destroy() does not hold the DLM lock over the whole diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 492eeea..8d52e21 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -191,6 +191,10 @@ static void mdc_realloc_openmsg(struct ptlrpc_request *req, old_size = lustre_packed_msg_size(old_msg); lustre_msg_set_buflen(old_msg, DLM_INTENT_REC_OFF + offset, body->eadatasize); + /* old buffer is more then need */ + if (old_len > body->eadatasize) + return; + new_size = lustre_packed_msg_size(old_msg); OBD_ALLOC(new_msg, new_size); @@ -538,7 +542,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, else offset += 2; - if (lustre_msg_buflen(req->rq_reqmsg, offset) < + if (lustre_msg_buflen(req->rq_reqmsg, offset) != body->eadatasize) mdc_realloc_openmsg(req, body); diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 41480df..987a81c 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -361,6 +361,8 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset, lmm_size = rec->ur_eadatalen; lmm = rec->ur_eadata; LASSERT(lmm); + LASSERT(lov_mds_md_size(lmm->lmm_stripe_count, + lmm->lmm_magic) == lmm_size); if (*handle == NULL) { int stripe_count = le32_to_cpu(lmm->lmm_stripe_count); -- 1.8.3.1