Whamcloud - gitweb
LU-3275 osd-ldiskfs: re-order osd device init/fini
authorFan Yong <yong.fan@whamcloud.com>
Wed, 1 May 2013 11:22:47 +0000 (19:22 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 7 May 2013 18:52:05 +0000 (14:52 -0400)
commit8bec3572c9a360ae44830358fc2441ae5b79baa4
tree4de1e27a2e705fcd5cd9e54bb6aa5333b5424f71
parenta6c26e19f7f189c78c7efa9e682b78e0e5f80d73
LU-3275 osd-ldiskfs: re-order osd device init/fini

There was race condition between the background OI scrub thread and
osd_device_init0: OI scrub thread may try to access non-initialized
osd_device::od_ost_map. So the osd initization/start process should
NOT trigger OI scrub until all the OI (OI files, /O, and ect.) have
been initialized. Reverse ordre for osd divice fini.

Test-Parameters: testlist=sanity-scrub

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I99a2a72ace947a0f79ace5c6f445cf896d884e63
Reviewed-on: http://review.whamcloud.com/6267
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_scrub.c