X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flov%2Flov_obd.c;h=3186999eed994e94c60bd0fd09746fe61c84a40e;hp=ae74d2262fb2bae9cf4d3fa7ac19d935408cdaae;hb=87c86d444e61e38d6454bba5700ba966dc1ac83d;hpb=b92e914bd75cb62d34d7e42e8bf78864755106f2 diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index ae74d22..3186999 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -763,21 +763,9 @@ lov_create(struct obd_export *exp, struct obdo *src_oa, struct lov_request *req = list_entry(pos, struct lov_request, rq_link); - obd_id *objids = oti->oti_objid; - - if (oti->oti_obj_alloc) { - __u64 next_id; - - /* - * allocating new objid. Here it is delegated to caller, - * that is MDS in CROW case. - */ - next_id = oti->oti_obj_alloc(&objids[req->rq_idx]); - req->rq_oa->o_id = next_id; - } else { - /* and here is default "allocator" */ - req->rq_oa->o_id = ++objids[req->rq_idx]; - } + /* XXX: LOV STACKING: use real "obj_mdp" sub-data */ + rc = obd_create(lov->tgts[req->rq_idx].ltd_exp, + req->rq_oa, NULL, 0, &req->rq_md, oti); lov_update_create_set(set, req, rc); } rc = lov_fini_create_set(set, ea); @@ -976,6 +964,12 @@ static int lov_setattr(struct obd_export *exp, struct obdo *src_oa, if (!exp || !exp->exp_obd) RETURN(-ENODEV); + LASSERT(!(src_oa->o_valid & ~(OBD_MD_FLID|OBD_MD_FLTYPE | OBD_MD_FLMODE| + OBD_MD_FLATIME | OBD_MD_FLMTIME | + OBD_MD_FLCTIME | OBD_MD_FLFLAGS | + OBD_MD_FLSIZE | OBD_MD_FLGROUP | + OBD_MD_FLUID | OBD_MD_FLGID))); + LASSERT(!(src_oa->o_valid & OBD_MD_FLGROUP) || src_oa->o_gr > 0); lov = &exp->exp_obd->u.lov; @@ -2131,6 +2125,21 @@ static int lov_set_info(struct obd_export *exp, obd_count keylen, spin_unlock(&lov->lov_lock); RETURN(rc); + } else if (KEY_IS("flush_cred")) { + struct lov_tgt_desc *tgt; + int rc = 0, i; + + for (i = 0, tgt = lov->tgts; i < lov->desc.ld_tgt_count; + i++, tgt++) { + if (!tgt->ltd_exp) + continue; + rc = obd_set_info(tgt->ltd_exp, + keylen, key, vallen, val); + if (rc) + RETURN(rc); + } + + RETURN(0); } else { RETURN(-EINVAL); }