Whamcloud - gitweb
b=6427
[fs/lustre-release.git] / lustre / lmv / lmv_obd.c
index 1ae1660..d69c956 100644 (file)
@@ -96,7 +96,7 @@ static int lmv_set_mdc_active(struct lmv_obd *lmv, struct obd_uuid *uuid,
                 CDEBUG(D_INFO, "lmv idx %d is %s conn "LPX64"\n",
                        i, tgt->uuid.uuid, tgt->ltd_exp->exp_handle.h_cookie);
 
-                if (strncmp(uuid->uuid, tgt->uuid.uuid, sizeof uuid->uuid) == 0)
+                if (obd_uuid_equals(uuid, &tgt->uuid))
                         break;
         }
 
@@ -1153,8 +1153,9 @@ repeat:
         CDEBUG(D_OTHER, "getattr_lock for %*s on "DLID4" -> "DLID4"\n",
                namelen, filename, OLID4(id), OLID4(&rid));
 
-        rc = md_getattr_lock(lmv->tgts[id_group(&rid)].ltd_exp, &rid,
-                             filename, namelen, (valid | OBD_MD_FID),
+        rc = md_getattr_lock(lmv->tgts[id_group(&rid)].ltd_exp,
+                             &rid, filename, namelen,
+                             valid == OBD_MD_FLID ? valid : valid | OBD_MD_FID,
                              ea_size, request);
         if (rc == 0) {
                 /*
@@ -1164,7 +1165,8 @@ repeat:
                  */
                 body = lustre_msg_buf((*request)->rq_repmsg, 0, sizeof(*body));
                 LASSERT(body != NULL);
-                LASSERT((body->valid & OBD_MD_FID) != 0);
+                LASSERT((body->valid & OBD_MD_FID) != 0
+                                || body->valid == OBD_MD_FLID);
 
                 if (body->valid & OBD_MD_MDS) {
                         struct ptlrpc_request *req = NULL;