From dce9a04ac1759843ef4b0263599f85ee9dc6b9e2 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 24 May 2006 01:15:07 +0000 Subject: [PATCH] Branch b1_5 b=8007 comment cleanup --- lustre/include/obd.h | 4 +++- lustre/mgc/mgc_request.c | 12 +++++++----- lustre/mgs/mgs_fs.c | 2 +- lustre/obdclass/obd_mount.c | 41 +++++++++++++++++++++++------------------ 4 files changed, 34 insertions(+), 25 deletions(-) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 772cbec..f042b56 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -551,7 +551,9 @@ struct niobuf_local { #define LUSTRE_ECHO_NAME "obdecho" #define LUSTRE_ECHO_CLIENT_NAME "echo_client" -/* Constant obd names */ +/* Constant obd names (post-rename) */ +#define LUSTRE_MDS_OBDNAME "MDS" +#define LUSTRE_OSS_OBDNAME "OSS" #define LUSTRE_MGS_OBDNAME "MGS" #define LUSTRE_MGC_OBDNAME "MGC" diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 0de5386..9fc644d 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -70,7 +70,7 @@ int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id) memcpy(&resname, logname, len); memset(res_id, 0, sizeof(*res_id)); - /* FIXME are resid names swabbed across the wire? */ + /* Always use the same endianness for the resid */ res_id->name[0] = cpu_to_le64(resname); CDEBUG(D_MGC, "log %s to resid "LPX64"/"LPX64" (%.8s)\n", logname, res_id->name[0], res_id->name[1], (char *)&res_id->name[0]); @@ -712,7 +712,7 @@ int mgc_set_info_async(struct obd_export *exp, obd_count keylen, } RETURN(0); } - /* Hack alert */ + /* FIXME move this to mgc_process_config */ if (KEY_IS("register_target")) { struct mgs_target_info *mti; if (vallen != sizeof(struct mgs_target_info)) @@ -843,7 +843,6 @@ static int mgc_copy_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, lcfg = (struct lustre_cfg *)cfg_buf; - /* FIXME we should always write to an empty log, so remove this check.*/ /* append new records */ if (rec->lrh_index >= llog_get_size(local_llh)) { rc = llog_write_rec(local_llh, &local_rec, NULL, 0, @@ -1017,6 +1016,7 @@ static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf) switch(cmd = lcfg->lcfg_command) { case LCFG_LOV_ADD_OBD: { + /* Add any new target, not just osts */ struct mgs_target_info *mti; if (LUSTRE_CFG_BUFLEN(lcfg, 1) != @@ -1029,7 +1029,8 @@ static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf) rc = mgc_target_register(obd->u.cli.cl_mgc_mgsexp, mti); break; } - case LCFG_LOV_DEL_OBD: + case LCFG_LOV_DEL_OBD: + /* Remove target from the fs? */ /* FIXME */ CERROR("lov_del_obd unimplemented\n"); rc = -ENOSYS; @@ -1056,7 +1057,8 @@ static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf) } /* COMPAT_146 */ - /* FIXME only set this for old logs! */ + /* FIXME only set this for old logs! Right now this forces + us to always skip the "inside markers" check */ cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146; rc = mgc_process_log(obd, cld); diff --git a/lustre/mgs/mgs_fs.c b/lustre/mgs/mgs_fs.c index 8151705..0794c67 100644 --- a/lustre/mgs/mgs_fs.c +++ b/lustre/mgs/mgs_fs.c @@ -118,7 +118,7 @@ int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt) int rc; ENTRY; - // FIXME what's this? + /* FIXME what's this? Do I need it? */ rc = cleanup_group_info(); if (rc) RETURN(rc); diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 17e4ea4..0ddb1b7 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -600,9 +600,9 @@ static int lustre_start_mgc(struct super_block *sb) obd = class_name2obd(LUSTRE_MGC_OBDNAME); if (obd) { atomic_inc(&obd->u.cli.cl_mgc_refcount); - /* FIXME There's only one MGC, but users could give different + /* There's only one MGC, but users could give different MGS nids on the mount line. So now do we add new MGS uuids - or not? If there's truly one MGS per site, the MGS uuids + or not? Since there's only one MGS per site, the MGS uuids _should_ all be the same. Maybe check here? */ @@ -838,12 +838,14 @@ static int server_stop_servers(int lddflags, int lsiflags) /* Either an MDT or an OST or neither */ /* if this was an MDT, and there are no more MDT's, clean up the MDS */ - if ((lddflags & LDD_F_SV_TYPE_MDT) && (obd = class_name2obd("MDS"))) { - //FIXME pre-rename, should eventually be LUSTRE_MDT_NAME + if ((lddflags & LDD_F_SV_TYPE_MDT) && + (obd = class_name2obd(LUSTRE_MDS_OBDNAME))) { + /*FIXME pre-rename, should eventually be LUSTRE_MDT_NAME*/ type = class_search_type(LUSTRE_MDS_NAME); } /* if this was an OST, and there are no more OST's, clean up the OSS */ - if ((lddflags & LDD_F_SV_TYPE_OST) && (obd = class_name2obd("OSS"))) { + if ((lddflags & LDD_F_SV_TYPE_OST) && + (obd = class_name2obd(LUSTRE_OSS_OBDNAME))) { type = class_search_type(LUSTRE_OST_NAME); } @@ -942,7 +944,7 @@ int server_register_target(struct super_block *sb) mti->mti_flags); /* Register the target */ - /* FIXME use mdc_process_config instead */ + /* FIXME use mgc_process_config instead */ rc = obd_set_info_async(mgc->u.cli.cl_mgc_mgsexp, strlen("register_target"), "register_target", sizeof(*mti), mti, NULL); @@ -996,12 +998,14 @@ static int server_start_targets(struct super_block *sb, struct vfsmount *mnt) /* If we're an MDT, make sure the global MDS is running */ if (lsi->lsi_ldd->ldd_flags & LDD_F_SV_TYPE_MDT) { - /* make sure (what will be called) the MDS is started */ - obd = class_name2obd("MDS"); + /* make sure the MDS is started */ + obd = class_name2obd(LUSTRE_MDS_OBDNAME); if (!obd) { - //FIXME pre-rename, should eventually be LUSTRE_MDS_NAME - rc = lustre_start_simple("MDS", LUSTRE_MDT_NAME, - "MDS_uuid", 0, 0); + rc = lustre_start_simple(LUSTRE_MDS_OBDNAME, + /* FIXME pre-rename, should eventually be LUSTRE_MDS_NAME */ + LUSTRE_MDT_NAME, + LUSTRE_MDS_OBDNAME"_uuid", + 0, 0); if (rc) { CERROR("failed to start MDS: %d\n", rc); GOTO(out_servers, rc); @@ -1012,10 +1016,12 @@ static int server_start_targets(struct super_block *sb, struct vfsmount *mnt) /* If we're an OST, make sure the global OSS is running */ if (lsi->lsi_ldd->ldd_flags & LDD_F_SV_TYPE_OST) { /* make sure OSS is started */ - obd = class_name2obd("OSS"); + obd = class_name2obd(LUSTRE_OSS_OBDNAME); if (!obd) { - rc = lustre_start_simple("OSS", LUSTRE_OSS_NAME, - "OSS_uuid", 0, 0); + rc = lustre_start_simple(LUSTRE_OSS_OBDNAME, + LUSTRE_OSS_NAME, + LUSTRE_OSS_OBDNAME"_uuid", + 0, 0); if (rc) { CERROR("failed to start OSS: %d\n", rc); GOTO(out_servers, rc); @@ -1315,8 +1321,7 @@ static void server_put_super(struct super_block *sb) if (lsi->lsi_flags & LSI_UMOUNT_FAILOVER) obd->obd_fail = 1; /* We can't seem to give an error return code - to .put_super, so we better make sure we clean up! - FIXME is there a way to get around this? */ + to .put_super, so we better make sure we clean up! */ obd->obd_force = 1; class_manual_cleanup(obd); } else { @@ -1499,8 +1504,8 @@ static int server_fill_super(struct super_block *sb) call s_p_s if so. Probably should start client from new thread so we can return. Client will not finish until all servers are connected. - Note - MGMT-only server does NOT get a client, since there is no - lustre fs associated - the MGMT is for all lustre fs's */ + Note - MGS-only server does NOT get a client, since there is no + lustre fs associated - the MGS is for all lustre fs's */ } rc = server_fill_super_common(sb); -- 1.8.3.1