Whamcloud - gitweb
LU-4260 lod: free striping if striping initialization fails 24/8324/2
authorwang di <di.wang@intel.com>
Mon, 18 Nov 2013 08:18:09 +0000 (00:18 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 6 Dec 2013 06:34:03 +0000 (06:34 +0000)
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:

[<ffffffffa0349895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[<ffffffffa0349e97>] lbug_with_loc+0x47/0xb0 [libcfs]
[<ffffffffa0e3f78f>] lod_ah_init+0x57f/0x5c0 [lod]
[<ffffffffa0b73a83>] mdd_object_make_hint+0x83/0xa0 [mdd]
[<ffffffffa0b7feb2>] mdd_create_data+0x332/0x7d0 [mdd]
[<ffffffffa0d9cc2c>] mdt_finish_open+0x125c/0x18a0 [mdt]
[<ffffffffa0d984f8>] ? mdt_object_open_lock+0x1c8/0x510 [mdt]
[<ffffffffa0d9ee8d>] mdt_reint_open+0x115d/0x20c0 [mdt]

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I67b2bd0e013b860767d19eda986fdcff7e16c486
Reviewed-on: http://review.whamcloud.com/8324
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

index 857320d..20fd4ea 100644 (file)
@@ -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);