Whamcloud - gitweb
LU-4941 lfsck: check LOV EA header properly 45/10045/4
authorFan Yong <fan.yong@intel.com>
Fri, 28 Mar 2014 17:47:07 +0000 (01:47 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 29 Apr 2014 17:22:17 +0000 (17:22 +0000)
commita8c9796fddaeda0572a64cedb471b2eead78c506
tree1dedc4645bb6d1643b1bad1d627c2281e1cb2def
parentb35de525a14843f07ca0dbe611e254c82b08e161
LU-4941 lfsck: check LOV EA header properly

1) If the LFSCK does not recognize the magic, then check whether
   the magic's postfix match the LOV_MAGIC_MAGIC or not: if yes,
   then it is quite possible that the system was downgraded from
   a new release with new LOV magic, so it is better to keep the
   current LOV EA unchanged; otherwise, it is crashed LOV EA and
   should be repaired by the LFSCK.

2) Check the pattern with lov_pattern().

3) Drop redundant LOV EA header verification.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iad3a1d6fc50a5dfba977a534fdb253bc9f6373e5
Reviewed-on: http://review.whamcloud.com/10045
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/lfsck/lfsck_layout.c