Whamcloud - gitweb
Branch b1_4_mountconf
authornathan <nathan>
Wed, 7 Dec 2005 01:25:56 +0000 (01:25 +0000)
committernathan <nathan>
Wed, 7 Dec 2005 01:25:56 +0000 (01:25 +0000)
b=8007
getting closer.  Ok, no more today.

lustre/mgc/mgc_request.c
lustre/mgs/mgs_handler.c
lustre/obdclass/obd_mount.c

index 33ca7f0..0528fc2 100644 (file)
@@ -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);
         }
index b48d2d0..4dfcee7 100644 (file)
@@ -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;
 
index a224a6d..9349122 100644 (file)
@@ -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);