From 54fc90ab76ab9e78d36346a03b39ccf32bbe328c Mon Sep 17 00:00:00 2001 From: bobijam Date: Tue, 22 Jul 2008 03:16:33 +0000 Subject: [PATCH] Branch b1_8_gate b=16205 i=shadow, adilger make max_grow_count on MDS tunable. --- lustre/osc/osc_create.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index b82bf62..b36c925 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -139,7 +139,7 @@ static int oscc_internal_create(struct osc_creator *oscc) RETURN(0); } - if (oscc->oscc_grow_count < OST_MAX_PRECREATE && + if (oscc->oscc_grow_count < oscc->oscc_max_grow_count && ((oscc->oscc_flags & OSCC_FLAG_LOW) == 0) && (__s64)(oscc->oscc_last_id - oscc->oscc_next_id) <= (oscc->oscc_grow_count / 4 + 1)) { @@ -147,8 +147,8 @@ static int oscc_internal_create(struct osc_creator *oscc) oscc->oscc_grow_count *= 2; } - if (oscc->oscc_grow_count > OST_MAX_PRECREATE / 2) - oscc->oscc_grow_count = OST_MAX_PRECREATE / 2; + if (oscc->oscc_grow_count > oscc->oscc_max_grow_count / 2) + oscc->oscc_grow_count = oscc->oscc_max_grow_count / 2; oscc->oscc_flags |= OSCC_FLAG_CREATING; spin_unlock(&oscc->oscc_lock); @@ -438,6 +438,7 @@ void oscc_init(struct obd_device *obd) spin_lock_init(&oscc->oscc_lock); oscc->oscc_obd = obd; oscc->oscc_grow_count = OST_MIN_PRECREATE; + oscc->oscc_max_grow_count = OST_MAX_PRECREATE; oscc->oscc_next_id = 2; oscc->oscc_last_id = 1; -- 1.8.3.1