From b6c3c128e27ca0374cc7837bd7cca32cf2daf9fb Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 7 Dec 2005 01:25:56 +0000 Subject: [PATCH] Branch b1_4_mountconf b=8007 getting closer. Ok, no more today. --- lustre/mgc/mgc_request.c | 1 + lustre/mgs/mgs_handler.c | 6 ++++-- lustre/obdclass/obd_mount.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 33ca7f0..0528fc2 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -80,6 +80,7 @@ int mgc_target_add(struct obd_export *exp, struct mgmt_target_info *mti) CERROR ("target_add failed. rc=%d\n", mti->mti_rc); GOTO (out, rc = mti->mti_rc); } + memcpy(mti, rep_mti, sizeof(*rep_mti)); CDEBUG(D_MGC, "target_add %s got index = %d\n", mti->mti_svname, mti->mti_stripe_index); } diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index b48d2d0..4dfcee7 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -301,6 +301,8 @@ static int mgs_handle_target_add(struct ptlrpc_request *req) } out: + CDEBUG(D_MGS, "replying with %s, index=%d\n", mti->mti_svname, + mti->mti_stripe_index); lustre_pack_reply(req, 1, &rep_size, NULL); /* send back the whole mti in the reply */ rep_mti = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*rep_mti)); @@ -344,11 +346,11 @@ int mgs_handle(struct ptlrpc_request *req) break; case MGMT_TARGET_ADD: - CDEBUG(D_MGS, "target add\n"); + DEBUG_REQ(D_MGS, req, "target add\n"); rc = mgs_handle_target_add(req); break; case MGMT_TARGET_DEL: - CDEBUG(D_MGS, "target del\n"); + DEBUG_REQ(D_MGS, req, "target del\n"); //rc = mgs_handle_target_del(req); break; diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index a224a6d..9349122 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -297,7 +297,7 @@ static int ldd_write(struct lvfs_run_ctxt *mount_ctxt, unsigned long len = sizeof(struct lustre_disk_data); int rc = 0; - LASSERT(ldd->ldd_magic != LDD_MAGIC); + LASSERT(ldd->ldd_magic == LDD_MAGIC); push_ctxt(&saved, mount_ctxt, NULL); -- 1.8.3.1