From: wang di Date: Mon, 18 Nov 2013 08:18:09 +0000 (-0800) Subject: LU-4260 lod: free striping if striping initialization fails X-Git-Tag: 2.5.53~69 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0515ccaef79c0ce8af1fbc918803a1638f148674;ds=sidebyside LU-4260 lod: free striping if striping initialization fails It should free striping if striping information initialization is faild, otherwise the later object find will pick up this wrong lod object, and hit LBUG ASSERTION( lc->ldo_stripenr == 0 ) failed: [] libcfs_debug_dumpstack+0x55/0x80 [libcfs] [] lbug_with_loc+0x47/0xb0 [libcfs] [] lod_ah_init+0x57f/0x5c0 [lod] [] mdd_object_make_hint+0x83/0xa0 [mdd] [] mdd_create_data+0x332/0x7d0 [mdd] [] mdt_finish_open+0x125c/0x18a0 [mdt] [] ? mdt_object_open_lock+0x1c8/0x510 [mdt] [] mdt_reint_open+0x115d/0x20c0 [mdt] Signed-off-by: wang di Change-Id: I67b2bd0e013b860767d19eda986fdcff7e16c486 Reviewed-on: http://review.whamcloud.com/8324 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/lod/lod_lov.c b/lustre/lod/lod_lov.c index 857320d..20fd4ea 100644 --- a/lustre/lod/lod_lov.c +++ b/lustre/lod/lod_lov.c @@ -551,6 +551,7 @@ int lod_generate_and_set_lovea(const struct lu_env *env, objs[i].l_ost_gen = cpu_to_le32(0); rc = lod_fld_lookup(env, lod, fid, &index, LU_SEQ_RANGE_OST); if (rc < 0) { + lod_object_free_striping(env, lo); CERROR("%s: Can not locate "DFID": rc = %d\n", lod2obd(lod)->obd_name, PFID(fid), rc); RETURN(rc);