Whamcloud - gitweb
LU-11681 lfsck: misc fixes in inserting shard 28/33928/14
authorLai Siyao <lai.siyao@intel.com>
Wed, 12 Dec 2018 16:14:13 +0000 (00:14 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Aug 2019 07:52:49 +0000 (07:52 +0000)
commit4becec906d3a997a8ff4a8c10e39633ff69bd738
tree603899c6f2e9020fe0aaba6f77cc986df2d11467
parenta6dafda245a4ee4c5a86f585914cf0dde87e420e
LU-11681 lfsck: misc fixes in inserting shard

* To insert a shard, we need to convert parent to a plain
directory by removing its LMV, and set back after insertion.
* If parent lost its LMV, after inserting shard, also copy
shard LMV to parent.
* Currenly remove striped directory LMV will remote its shard
LMV too, but if directory LMV is corrupt, removing will fail.
As a work around, don't remove shard LMV when removing striped
directory LMV, normally when we do this, we will remove shards.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ic0f6c2eadb607e82b281ffaf9eaa75284ab90a16
Reviewed-on: https://review.whamcloud.com/33928
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lfsck/lfsck_namespace.c
lustre/lod/lod_object.c