X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmgc%2Fmgc_request.c;h=7d35508bb61dfd9b18666ccd9dfdc51a5a859773;hp=b263c4b4cce1e83de0867a1e98e4df1ecd905f24;hb=e70a41c4316b5eb3a0b8e6b52c95653a2d4c85e5;hpb=f0e2fc455895e6fd780be34fe79a2a198fd1651f diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index b263c4b..7d35508 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1573,6 +1573,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc, static int mgc_process_recover_nodemap_log(struct obd_device *obd, struct config_llog_data *cld) { + struct ptlrpc_connection *mgc_conn; struct ptlrpc_request *req = NULL; struct config_llog_instance *cfg = &cld->cld_cfg; struct mgs_config_body *body; @@ -1580,17 +1581,23 @@ static int mgc_process_recover_nodemap_log(struct obd_device *obd, struct nodemap_config *new_config = NULL; struct lu_nodemap *recent_nodemap = NULL; struct ptlrpc_bulk_desc *desc; - struct page **pages; + struct page **pages = NULL; __u64 config_read_offset = 0; - int nrpages; + int nrpages = 0; bool eof = true; bool mne_swab = false; int i; int ealen; int rc; - ENTRY; + mgc_conn = class_exp2cliimp(cld->cld_mgcexp)->imp_connection; + + /* don't need to get local config */ + if (cld_is_nodemap(cld) && + (LNET_NETTYP(LNET_NIDNET(mgc_conn->c_peer.nid)) == LOLND)) + GOTO(out, rc = 0); + /* allocate buffer for bulk transfer. * if this is the first time for this mgs to read logs, * CONFIG_READ_NRPAGES_INIT will be used since it will read all logs