Whamcloud - gitweb
LU-4870 lfsck: lock old MDT-object in migrating 82/13182/6
authorFan Yong <fan.yong@intel.com>
Tue, 21 Oct 2014 13:54:21 +0000 (21:54 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 4 Feb 2015 02:47:42 +0000 (02:47 +0000)
commit19ae9b3605bd41348b2bd64accc50a34eaaa35a1
treec17373d38a41701a58a8aa03297d9840c6cd2442
parent0fab7dc89f4756538f8b67e7736abd6f225abae8
LU-4870 lfsck: lock old MDT-object in migrating

According to current metadata migration implementation, before the old
MDT-object is removed, both the new MDT-object and old MDT-object will
reference the same LOV layout. Then if the layout LFSCK finds the new
MDT-object by race, it will regard related OST-object(s) as multiple
referenced case, and will try to create new OST-object(s) for the new
MDT-object. To avoid such trouble, the layout LFSCK needs to lock the
old MDT-object before confirm the multiple referenced case.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I9e42cb86683c33bedfef01ae7f6e2cc305f1137d
Reviewed-on: http://review.whamcloud.com/13182
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/include/obd_support.h
lustre/lfsck/lfsck_layout.c
lustre/mdd/mdd_dir.c
lustre/tests/sanity-lfsck.sh