obd_id oscc_last_id;//last available pre-created object
obd_id oscc_next_id;// what object id to give out next
obd_id oscc_gr;
- int oscc_initial_create_count;
int oscc_grow_count;
+ int oscc_max_grow_count;
int oscc_kick_barrier;
struct osc_created *oscc_osccd;
struct obdo oscc_oa;
spin_lock(&oscc->oscc_lock);
body->oa.o_id = oscc->oscc_last_id + oscc->oscc_grow_count;
+ /* probably we should take frequence of request into account? -bzzz */
+ if (oscc->oscc_grow_count < oscc->oscc_max_grow_count) {
+ oscc->oscc_grow_count *= 2;
+ if (oscc->oscc_grow_count > oscc->oscc_max_grow_count)
+ oscc->oscc_grow_count = oscc->oscc_max_grow_count;
+ }
body->oa.o_gr = oscc->oscc_gr;
LASSERT(body->oa.o_gr > 0);
body->oa.o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP;
spin_lock_init(&oscc->oscc_lock);
oscc->oscc_obd = obd;
oscc->oscc_kick_barrier = 100;
- oscc->oscc_grow_count = 2000;
- oscc->oscc_initial_create_count = 2000;
+ oscc->oscc_grow_count = 36;
+ oscc->oscc_max_grow_count = 2000;
oscc->oscc_next_id = 2;
oscc->oscc_last_id = 1;
struct ost_body *body;
struct obd_ioobj *ioobj;
struct niobuf_remote *niobuf;
- unsigned long flags;
int niocount;
int size[3];
int i;
memcmp(key, "growth_count", strlen("growth_count")) == 0) {
if (vallen != sizeof(int))
RETURN(-EINVAL);
- obd->u.cli.cl_oscc.oscc_grow_count = *((int*)val);
+ obd->u.cli.cl_oscc.oscc_max_grow_count = *((int*)val);
RETURN(0);
}