From 71550222fca7e2b0066d9d6d97fcfbe6e4d88bc1 Mon Sep 17 00:00:00 2001 From: yury Date: Sun, 15 Oct 2006 10:38:31 +0000 Subject: [PATCH] - split fixes --- lustre/cmm/cmm_split.c | 30 ++++++++++++++---------------- lustre/fld/fld_handler.c | 2 +- lustre/fld/fld_request.c | 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/lustre/cmm/cmm_split.c b/lustre/cmm/cmm_split.c index d96e686..59ca566 100644 --- a/lustre/cmm/cmm_split.c +++ b/lustre/cmm/cmm_split.c @@ -86,7 +86,7 @@ cleanup: (sizeof(struct lmv_stripe_md) + (stripes) * sizeof(struct lu_fid)) #if 0 /* Under discussion, disabled for now */ -static int cmm_slave_fids_alloc(const struct lu_env *env, +static int cmm_fids_slave_alloc(const struct lu_env *env, struct cmm_device *cmm, struct lu_fid *fids) { @@ -119,7 +119,7 @@ static int cmm_slave_fids_alloc(const struct lu_env *env, RETURN(rc); } #else -static int cmm_slave_fids_alloc(const struct lu_env *env, +static int cmm_fids_slave_alloc(const struct lu_env *env, struct cmm_device *cmm, struct lu_fid *fids) { @@ -212,9 +212,9 @@ static int cmm_create_remote_obj(const struct lu_env *env, RETURN(rc); } #if 0 -static int cmm_create_slave_objects(const struct lu_env *env, - struct md_object *mo, - struct md_attr *ma) +static int cmm_objs_slave_create(const struct lu_env *env, + struct md_object *mo, + struct md_attr *ma) { struct cmm_device *cmm = cmm_obj2dev(md2cmm_obj(mo)); struct lmv_stripe_md *lmv = NULL, *slave_lmv = NULL; @@ -237,7 +237,7 @@ static int cmm_create_slave_objects(const struct lu_env *env, lmv->mea_ids[cmm->cmm_local_num] = *lf; /* Allocate slave fids and setup FLD for them. */ - rc = cmm_alloc_slave_fids(env, cmm, lmv->mea_ids); + rc = cmm_fids_slave_alloc(env, cmm, lmv->mea_ids); if (rc) GOTO(cleanup, rc); @@ -270,9 +270,9 @@ cleanup: return rc; } #else -static int cmm_create_slave_objects(const struct lu_env *env, - struct md_object *mo, - struct md_attr *ma) +static int cmm_objs_slave_create(const struct lu_env *env, + struct md_object *mo, + struct md_attr *ma) { struct cmm_device *cmm = cmm_obj2dev(md2cmm_obj(mo)); struct lmv_stripe_md *lmv = NULL, *slave_lmv = NULL; @@ -295,7 +295,7 @@ static int cmm_create_slave_objects(const struct lu_env *env, lmv->mea_ids[0] = *lf; /* Allocate slave fids and setup FLD for them. */ - rc = cmm_slave_fids_alloc(env, cmm, lmv->mea_ids); + rc = cmm_fids_slave_alloc(env, cmm, lmv->mea_ids); if (rc) GOTO(cleanup, rc); @@ -426,9 +426,10 @@ static int cmm_remove_entries(const struct lu_env *env, } } *len = CFS_PAGE_SIZE; + EXIT; unmap: kunmap(rdpg->rp_pages[0]); - RETURN(rc); + return rc; } static int cmm_split_entries(const struct lu_env *env, @@ -507,13 +508,10 @@ static int cmm_scan_and_split(const struct lu_env *env, } hash_segement = MAX_HASH_SIZE / (cmm->cmm_tgt_count + 1); - for (i = 0; i < cmm->cmm_tgt_count + 1; i++) { + for (i = 1; i < cmm->cmm_tgt_count + 1; i++) { struct lu_fid *lf; __u32 hash_end; - if (i == cmm->cmm_local_num) - continue; - lf = &ma->ma_lmv->mea_ids[i]; rdpg->rp_hash = i * hash_segement; @@ -578,7 +576,7 @@ int cml_try_to_split(const struct lu_env *env, struct md_object *mo) GOTO(cleanup, rc = 0); /* step2: create slave objects */ - rc = cmm_create_slave_objects(env, mo, ma); + rc = cmm_objs_slave_create(env, mo, ma); if (rc) GOTO(cleanup, ma); diff --git a/lustre/fld/fld_handler.c b/lustre/fld/fld_handler.c index 59d8ce9..2b858e5 100644 --- a/lustre/fld/fld_handler.c +++ b/lustre/fld/fld_handler.c @@ -164,7 +164,7 @@ static int fld_server_handle(struct lu_server_fld *fld, rc = -EINVAL; break; } - CDEBUG(D_INFO|D_WARNING, "%s: FLD req handle error %d (opc: %d, seq: " + CDEBUG(D_INFO|D_WARNING, "%s: FLD req handle: error %d (opc: %d, seq: " LPX64", mds: "LPU64")\n", fld->lsf_name, rc, opc, mf->mf_seq, mf->mf_mds); RETURN(rc); diff --git a/lustre/fld/fld_request.c b/lustre/fld/fld_request.c index 5b23b9c..159dad0 100644 --- a/lustre/fld/fld_request.c +++ b/lustre/fld/fld_request.c @@ -447,7 +447,7 @@ int fld_client_create(struct lu_client_fld *fld, LASSERT(target != NULL); CDEBUG(D_INFO|D_WARNING, "%s: Create fld entry (seq: "LPX64"; mds: " - LPX64") on target %s (idx "LPU64")\n", fld->lcf_name, + LPU64") on target %s (idx "LPU64")\n", fld->lcf_name, seq, mds, fld_target_name(target), target->ft_idx); #ifdef __KERNEL__ -- 1.8.3.1