From 2089d949f4d6db2ecd1f6d83a583c849561407c5 Mon Sep 17 00:00:00 2001 From: phil Date: Wed, 20 Aug 2003 23:32:38 +0000 Subject: [PATCH] one big fix: - in osc_create, set oa->o_id AFTER copying oscc_oa overtop of it, so that we don't give every new file object 6 lots of little fixes: - call mds_lov_set_nextid() from the end of mds_postsetup() - ...make that safe by calling mds_lov_connect() at the beginning of mds_lov_set_nextid() - in filter_create, stop holding the directory lock for reply acks. it's not needed anymore, and causes obvious deadlock during precreation - clean up the error handling in filter_precreate - start precreating when there are fewer than "kick_barrier" objects remaining, and then create "grow_count" additional objects moving on to larger tests: - initial_create_count is now 100 - kick_barrier is now 50 - grow_count is now 100 --- lustre/osc/osc_create.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index 0b1eedb..e4b92ef0 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -104,7 +104,7 @@ static int oscc_precreate(struct osc_creator *oscc, struct osc_created *osccd, struct l_wait_info lwi = { 0 }; ENTRY; - if (oscc_has_objects(oscc, oscc->oscc_grow_count)) + if (oscc_has_objects(oscc, oscc->oscc_kick_barrier)) RETURN(0); spin_lock(&osccd->osccd_lock); @@ -164,8 +164,8 @@ int osc_create(struct lustre_handle *exph, struct obdo *oa, while (try_again) { spin_lock(&oscc->oscc_lock); if (oscc->oscc_last_id >= oscc->oscc_next_id) { - oa->o_id = oscc->oscc_next_id; memcpy(oa, &oscc->oscc_oa, sizeof(*oa)); + oa->o_id = oscc->oscc_next_id; lsm->lsm_object_id = oscc->oscc_next_id; *ea = lsm; oscc->oscc_next_id++; @@ -277,9 +277,9 @@ void oscc_init(struct lustre_handle *exph) init_waitqueue_head(&oed->oed_oscc.oscc_waitq); oed->oed_oscc.oscc_exph = exph; oed->oed_oscc.oscc_osccd = &osc_created; - oed->oed_oscc.oscc_kick_barrier = 1; - oed->oed_oscc.oscc_grow_count = 1; - oed->oed_oscc.oscc_initial_create_count = 1; + oed->oed_oscc.oscc_kick_barrier = 50; + oed->oed_oscc.oscc_grow_count = 100; + oed->oed_oscc.oscc_initial_create_count = 100; oed->oed_oscc.oscc_next_id = 2; oed->oed_oscc.oscc_last_id = 1; -- 1.8.3.1