Whamcloud - gitweb
LU-12961 mdd: avoid double call to mdd_changelog_fini() 37/36737/11
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 12 Nov 2019 17:45:50 +0000 (20:45 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 08:25:27 +0000 (08:25 +0000)
commitc5165557f561c13d83b355f4118d6c4564b5d036
treea882aa1ddb92de588489a94df9463d9534909193
parent6873482608ed61dc15a309a1384eec86124ca995
LU-12961 mdd: avoid double call to mdd_changelog_fini()

the first call is done from mdd_prepare() as part of error
handling, another call is done from mdd_device_shutdown().

in the similar cases fini routines checks whether the state
is initialized. e.g. mdd_orphan_index_fini() releases the
object and sets mdd_orphans to NULL, then all subsequent
calls to mdd_orphan_index_fini() return immediately.
mdd_changelog_fini() can't do this way, so the excplicit
state has been introduced.

Change-Id: Ifd21569e68c836f44bb59adea4e8fed6ccef1c7b
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36737
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
lustre/mdd/mdd_device.c
lustre/mdd/mdd_internal.h