Whamcloud - gitweb
LU-3336 lfsck: use rbtree to record OST-object accessing 43/7743/21
authorFan Yong <fan.yong@intel.com>
Tue, 11 Feb 2014 04:53:47 +0000 (12:53 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Feb 2014 00:16:43 +0000 (00:16 +0000)
commitccadcfd3940040465a59a13367f0d79a823625bd
treed0753a18ad41e8455b674948b1bf2cec74edb6e1
parent51f5621c04b363dcde7e1bb3dcdb2ebd3b2919fd
LU-3336 lfsck: use rbtree to record OST-object accessing

To find out orphan OST-objects, the LFSCK on OST side maintains
two bitmaps in RAM for the OST-object accessed during the LFSCK.
After the first cycle system scanning, the LFSCK got the bitmap
for the known OST-objects, and got another bitmap for which OST
objects have been referenced by MDT-objects. Then the LFSCK can
know which OST-objects are not referenced by any MDT-object via
comparing the two bitmaps.

Above two bitmaps are organized via a single rbtree. The rbtree
is maintained by LFSCK on the OST side. For every LFSCK scanned
OST-object, it will be recorded in the known-bitmap, for every
OST-object accessed by any RPC during the scanning, it will be
recoreded in the accessed-bitmap.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If399584a8617e7c368e48922a3582294ac98d5f4
Reviewed-on: http://review.whamcloud.com/7743
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/dt_object.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_lfsck.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_objects.c
lustre/target/out_handler.c
lustre/target/tgt_internal.h