summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f0e2fc4)
An MGC that is co-located with an MGS does not need to pull the
nodemap config as the MGS will manage it directly. Having the MGC
pull the config could lead to a race condition where new config
changes are overwritten by the old config.
Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: Ief62f44dd3ef75abb704edee0e55f7f1b1334e42
Reviewed-on: http://review.whamcloud.com/21500
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
static int mgc_process_recover_nodemap_log(struct obd_device *obd,
struct config_llog_data *cld)
{
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;
struct ptlrpc_request *req = NULL;
struct config_llog_instance *cfg = &cld->cld_cfg;
struct mgs_config_body *body;
struct nodemap_config *new_config = NULL;
struct lu_nodemap *recent_nodemap = NULL;
struct ptlrpc_bulk_desc *desc;
struct nodemap_config *new_config = NULL;
struct lu_nodemap *recent_nodemap = NULL;
struct ptlrpc_bulk_desc *desc;
+ struct page **pages = NULL;
__u64 config_read_offset = 0;
__u64 config_read_offset = 0;
bool eof = true;
bool mne_swab = false;
int i;
int ealen;
int rc;
bool eof = true;
bool mne_swab = false;
int i;
int ealen;
int rc;
+ 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
/* 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