From bbce01b553de8ce3880cee5b156c4ec5616c616e Mon Sep 17 00:00:00 2001 From: wangdi Date: Sun, 13 Jun 2004 17:58:06 +0000 Subject: [PATCH] in create obj, the inode should get stripe info from parent for sanity 65b. get fix from b1_2smallfix --- lustre/mds/mds_open.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 4dbc817..14d740b 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -389,6 +389,21 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset, 0, &lsm, rec->ur_eadata); if (rc) GOTO(out_oa, rc); + } else { + OBD_ALLOC(lmm, mds->mds_max_mdsize); + if (lmm == NULL) + GOTO(out_oa, rc = -ENOMEM); + + lmm_size = mds->mds_max_mdsize; + rc = mds_get_md(obd, dchild->d_parent->d_inode, + lmm, &lmm_size, 1); + if (rc > 0) + rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE, + mds->mds_osc_exp, + 0, &lsm, lmm); + OBD_FREE(lmm, mds->mds_max_mdsize); + if (rc) + GOTO(out_oa, rc); } LASSERT(oa->o_gr >= FILTER_GROUP_FIRST_MDS); rc = obd_create(mds->mds_osc_exp, oa, &lsm, &oti); -- 1.8.3.1