From d69fd9799a1d75e138098bfb59f0677d64fbca15 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 6 Nov 2006 22:33:43 +0000 Subject: [PATCH] cmm,osd: add debugging to catch bug11150. --- lustre/cmm/cmm_split.c | 5 ++++- lustre/mdd/mdd_object.c | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lustre/cmm/cmm_split.c b/lustre/cmm/cmm_split.c index bab0a16..b0807dd 100644 --- a/lustre/cmm/cmm_split.c +++ b/lustre/cmm/cmm_split.c @@ -559,6 +559,8 @@ static int cmm_split_process_stripe(const struct lu_env *env, RETURN(rc); } +extern int bug11150; + static int cmm_split_process_dir(const struct lu_env *env, struct md_object *mo, struct md_attr *ma) @@ -589,7 +591,7 @@ static int cmm_split_process_dir(const struct lu_env *env, lf = &ma->ma_lmv->mea_ids[i]; rdpg->rp_hash = i * hash_segement; - if (i == cmm->cmm_tgt_count) + if (i == cmm->cmm_tgt_count) hash_end = MAX_HASH_SIZE; else hash_end = rdpg->rp_hash + hash_segement; @@ -598,6 +600,7 @@ static int cmm_split_process_dir(const struct lu_env *env, CERROR("Error (rc = %d) while splitting for %d: fid=" DFID", %08x:%08x\n", rc, i, PFID(lf), rdpg->rp_hash, hash_end); + bug11150 = 1; GOTO(cleanup, rc); } } diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 2bef61b..f150e39 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -1239,6 +1239,9 @@ static int mdd_readpage_sanity_check(const struct lu_env *env, RETURN(rc); } +int bug11150 = 0; +EXPORT_SYMBOL(bug11150); + static int mdd_dir_page_build(const struct lu_env *env, int first, void *area, int nob, struct dt_it_ops *iops, struct dt_it *it, __u32 *start, __u32 *end, @@ -1279,6 +1282,12 @@ static int mdd_dir_page_build(const struct lu_env *env, int first, CDEBUG(D_INFO, "%p %p %d "DFID": %#8.8x (%d) \"%*.*s\"\n", name, ent, nob, PFID(fid2), hash, len, len, len, name); + if (bug11150) + CDEBUG(D_INFO, + "%p %p %d "DFID": %#8.8x (%d) \"%*.*s\"\n", + name, ent, nob, PFID(fid2), hash, + len, len, len, name); + if (nob >= recsize) { fid_be_to_cpu(&ent->lde_fid, fid); fid_cpu_to_le(&ent->lde_fid, &ent->lde_fid); -- 1.8.3.1