Skip to content
Snippets Groups Projects
Commit 02383a9f authored by Alexey Lyashkov's avatar Alexey Lyashkov
Browse files

don't create too many objects after del orphan.

b=14835
i=tappro
i=deen
parent fa1d4b10
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,14 @@ tbd Sun Microsystems, Inc.
* RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a
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
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment