From: Bobi Jam Date: Tue, 26 Feb 2013 01:55:58 +0000 (+0800) Subject: LU-2828 osp: correct osp device finialize order X-Git-Tag: 2.3.62~24 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=757c8740038b257c6cb8c0f57dab91a3280e6ef9;p=fs%2Flustre-release.git LU-2828 osp: correct osp device finialize order * Should stop osp precreate thread before releasing its last used oid/seq files. * git commit 71bdcf99 changes the return value of writeconf_or_reformat, it's a cleanup function and when writeconf does not work it reformat device and should return 0 (success) in the end. Signed-off-by: Bobi Jam Change-Id: I82307dea94bd9ec62088bc931c6b4dd7b90776a0 Reviewed-on: http://review.whamcloud.com/5528 Tested-by: Hudson Reviewed-by: Niu Yawei Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Alex Zhuravlev --- diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index fce9c94..f8c6fef 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -351,9 +351,6 @@ static int osp_shutdown(const struct lu_env *env, struct osp_device *d) ENTRY; LASSERT(env); - /* release last_used file */ - if (!d->opd_connect_mdt) - osp_last_used_fini(env, d); rc = osp_disconnect(d); @@ -363,6 +360,9 @@ static int osp_shutdown(const struct lu_env *env, struct osp_device *d) /* stop sync thread */ osp_sync_fini(d); + + /* release last_used file */ + osp_last_used_fini(env, d); } obd_fid_fini(d->opd_obd); diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 4e60922..2e7ae14 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -114,7 +114,7 @@ writeconf_or_reformat() { # Better reformat if it fails... writeconf_all $MDSCOUNT 2 || { echo "tunefs failed, reformatting instead" && - reformat_and_config && return 1; } + reformat_and_config && return 0; } return 0 }