From 0a713200f663ba86c2a7f5bc65726cd8884fc79f Mon Sep 17 00:00:00 2001 From: tappro Date: Wed, 1 Jul 2009 08:56:23 +0000 Subject: [PATCH] Branch HEAD b=17765 i=zam i=fanyong Update server boot epoch even if recovery didn't start --- lustre/ldlm/ldlm_lib.c | 5 ++++- lustre/obdfilter/filter.c | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 3391807..b4e9d61 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1874,8 +1874,11 @@ static void target_recovery_expired(unsigned long castmeharder) void target_recovery_init(struct lu_target *lut, svc_handler_t handler) { struct obd_device *obd = lut->lut_obd; - if (obd->obd_max_recoverable_clients == 0) + if (obd->obd_max_recoverable_clients == 0) { + /** Update server last boot epoch */ + lut_boot_epoch_update(lut); return; + } CWARN("RECOVERY: service %s, %d recoverable clients, " "last_transno "LPU64"\n", obd->obd_name, diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index c8d25cf..570dc00 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -2098,11 +2098,6 @@ int filter_common_setup(struct obd_device *obd, struct lustre_cfg* lcfg, init_mutex(&filter->fo_init_lock); filter->fo_committed_group = 0; - - rc = filter_prep(obd); - if (rc) - GOTO(err_ops, rc); - filter->fo_destroys_in_progress = 0; for (i = 0; i < 32; i++) sema_init(&filter->fo_create_locks[i], 1); @@ -2118,6 +2113,10 @@ int filter_common_setup(struct obd_device *obd, struct lustre_cfg* lcfg, filter->fo_fmd_max_num = FILTER_FMD_MAX_NUM_DEFAULT; filter->fo_fmd_max_age = FILTER_FMD_MAX_AGE_DEFAULT; + rc = filter_prep(obd); + if (rc) + GOTO(err_ops, rc); + CFS_INIT_LIST_HEAD(&filter->fo_llog_list); spin_lock_init(&filter->fo_llog_list_lock); -- 1.8.3.1