Whamcloud - gitweb
Land b1_2 onto HEAD (20040304_171022)
[fs/lustre-release.git] / lustre / lov / lov_log.c
index 59dc29e..7809366 100644 (file)
@@ -92,7 +92,8 @@ static int lov_llog_origin_add(struct llog_ctxt *ctxt,
 
 static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count,
                                    struct llog_logid *logid, 
-                                   struct llog_gen *gen)
+                                   struct llog_gen *gen,
+                                   struct obd_uuid *uuid)
 {
         struct obd_device *obd = ctxt->loc_obd;
         struct lov_obd *lov = &obd->u.lov;
@@ -103,7 +104,11 @@ static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count,
         for (i = 0; i < lov->desc.ld_tgt_count; i++) {
                 struct obd_device *child = lov->tgts[i].ltd_exp->exp_obd;
                 struct llog_ctxt *cctxt = llog_get_context(child, ctxt->loc_idx);
-                rc = llog_connect(cctxt, 1, logid, gen);
+
+                if (uuid && !obd_uuid_equals(uuid, &lov->tgts[i].uuid))
+                        continue;
+
+                rc = llog_connect(cctxt, 1, logid, gen, uuid);
                 if (rc) {
                         CERROR("error osc_llog_connect %d\n", i);
                         break;
@@ -156,18 +161,18 @@ static struct llog_operations lov_size_repl_logops = {
 
 
 int lov_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                  int count, struct llog_logid *logid)
+                  int count, struct llog_catid *logid)
 {
         struct lov_obd *lov = &obd->u.lov;
         int i, rc = 0;
         ENTRY;
-        
+
         rc = llog_setup(obd, LLOG_UNLINK_ORIG_CTXT, tgt, 0, NULL,
                         &lov_unlink_orig_logops);
         if (rc)
                 RETURN(rc);
 
-        rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL, 
+        rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL,
                         &lov_size_repl_logops);
         if (rc)
                 RETURN(rc);