From: shadow Date: Fri, 23 May 2008 06:02:49 +0000 (+0000) Subject: don't create too many objects after del orphan. X-Git-Tag: v1_9_50~453 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=02383a9f01a00c7b8e8a5f4666c8f02874d07a12;p=fs%2Flustre-release.git don't create too many objects after del orphan. b=14835 i=tappro i=deen --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 216a81a..a1ccc1b 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -13,6 +13,14 @@ tbd Sun Microsystems, Inc. removed cwd "./" (refer to Bugzilla 14399). Severity : normal +Bugzilla : 14835 +Frequency : after recovery +Description: precreate to many object's after del orphan. +Details : del orphan st in oscc last_id == next_id and this triger growing + count of precreated objects. Set flag LOW to skip increase count + of precreated objects. + +Severity : normal Bugzilla : 15139 Frequency : rare, on clear nid stats Description: ASSERTION(client_stat->nid_exp_ref_count == 0) diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index aff69bd..ab1052b 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -132,8 +132,14 @@ static int oscc_internal_create(struct osc_creator *oscc) LASSERT_SPIN_LOCKED(&oscc->oscc_lock); + if (oscc->oscc_flags & OSCC_FLAG_CREATING || + oscc->oscc_flags & OSCC_FLAG_RECOVERING) { + spin_unlock(&oscc->oscc_lock); + RETURN(0); + } + if (oscc->oscc_grow_count < OST_MAX_PRECREATE && - !(oscc->oscc_flags & (OSCC_FLAG_LOW | OSCC_FLAG_RECOVERING)) && + ((oscc->oscc_flags & OSCC_FLAG_LOW) == 0) && (__s64)(oscc->oscc_last_id - oscc->oscc_next_id) <= (oscc->oscc_grow_count / 4 + 1)) { oscc->oscc_flags |= OSCC_FLAG_LOW; @@ -143,11 +149,6 @@ static int oscc_internal_create(struct osc_creator *oscc) if (oscc->oscc_grow_count > OST_MAX_PRECREATE / 2) oscc->oscc_grow_count = OST_MAX_PRECREATE / 2; - if (oscc->oscc_flags & OSCC_FLAG_CREATING || - oscc->oscc_flags & OSCC_FLAG_RECOVERING) { - spin_unlock(&oscc->oscc_lock); - RETURN(0); - } oscc->oscc_flags |= OSCC_FLAG_CREATING; spin_unlock(&oscc->oscc_lock); @@ -326,6 +327,9 @@ int osc_create(struct obd_export *exp, struct obdo *oa, RETURN(0); } oscc->oscc_flags |= OSCC_FLAG_SYNC_IN_PROGRESS; + /* seting flag LOW we prevent extra grow precreate size + * and enforce use last assigned size */ + oscc->oscc_flags |= OSCC_FLAG_LOW; spin_unlock(&oscc->oscc_lock); CDEBUG(D_HA, "%s: oscc recovery started - delete to "LPU64"\n", oscc->oscc_obd->obd_name, oscc->oscc_next_id - 1);