From: Bobi Jam Date: Sat, 3 Dec 2011 14:21:46 +0000 (+0800) Subject: LU-887 mgc: prevent client IR with old server X-Git-Tag: 2.1.53~48 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=18699461ef9229d19a5b25ed80e252f4fa179822;ds=sidebyside LU-887 mgc: prevent client IR with old server Prevent IR enabled client start IR handling with IR unawared MGS server. Signed-off-by: Bobi Jam Change-Id: I9773eafa437358dbf4988e0fddd490b0daf59358 Reviewed-on: http://review.whamcloud.com/1798 Tested-by: Hudson Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index a628354..49262b4 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1905,8 +1905,15 @@ static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf) cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146; rc = mgc_process_log(obd, cld); - if (rc == 0 && cld->cld_recover) { - rc = mgc_process_log(obd, cld->cld_recover); + if (rc == 0 && cld->cld_recover != NULL) { + if (OCD_HAS_FLAG(&obd->u.cli.cl_import-> + imp_connect_data, IMP_RECOV)) { + rc = mgc_process_log(obd, cld->cld_recover); + } else { + struct config_llog_data *cir = cld->cld_recover; + cld->cld_recover = NULL; + config_log_put(cir); + } if (rc) CERROR("Cannot process recover llog %d\n", rc); }