From: braam Date: Tue, 19 Aug 2003 08:28:36 +0000 (+0000) Subject: - remainder of the pre-create code (more or less) X-Git-Tag: v1_7_0_51~2^7~661 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2c41dc2d8ace626aa3187c5a30181f81ba9650e2;p=fs%2Flustre-release.git - remainder of the pre-create code (more or less) - routines to set next_id - routines to clear orphans - routines to set growth count - minor cleanups --- diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index 431fd3e..33b241a 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -153,6 +153,14 @@ int osc_create(struct lustre_handle *exph, struct obdo *oa, RETURN(rc); } + /* this is the special case where create removes orphans */ + if (oa->o_valid == (OBD_MD_FLID | OBD_MD_FLFLAGS) && + oa->o_flags == OBD_FL_DELORPHAN) { + oa->o_id = oscc->oscc_next_id; + rc = osc_real_create(oscc->oscc_exph, oa, ea, NULL); + RETURN(rc); + } + while (try_again) { spin_lock(&oscc->oscc_lock); if (oscc->oscc_last_id > oscc->oscc_next_id) {