diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h index 15bb9c6d75425177de39133cfa74f74586e34ac6..c2f550fc8bce616a25cde0c99b6d9fa919252f62 100644 --- a/lustre/include/lustre_log.h +++ b/lustre/include/lustre_log.h @@ -197,7 +197,7 @@ int llog_catalog_list(struct obd_device *obd, int count, /* llog_net.c */ int llog_initiator_connect(struct llog_ctxt *ctxt); int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp); -int llog_origin_connect(struct llog_ctxt *ctxt, int count, +int llog_origin_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid); int llog_handle_connect(struct ptlrpc_request *req); @@ -207,7 +207,7 @@ int llog_obd_repl_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, int count, struct llog_cookie *cookies, int flags); int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp); -int llog_obd_repl_connect(struct llog_ctxt *ctxt, int count, +int llog_obd_repl_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid); @@ -236,7 +236,7 @@ struct llog_operations { struct llog_cookie *logcookies, int numcookies); int (*lop_cancel)(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, int count, struct llog_cookie *cookies, int flags); - int (*lop_connect)(struct llog_ctxt *ctxt, int count, + int (*lop_connect)(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid); /* XXX add 2 more: commit callbacks and llog recovery functions */ @@ -572,7 +572,7 @@ static inline int llog_create(struct llog_ctxt *ctxt, struct llog_handle **res, RETURN(rc); } -static inline int llog_connect(struct llog_ctxt *ctxt, int count, +static inline int llog_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) { @@ -586,7 +586,7 @@ static inline int llog_connect(struct llog_ctxt *ctxt, int count, if (lop->lop_connect == NULL) RETURN(-EOPNOTSUPP); - rc = lop->lop_connect(ctxt, count, logid, gen, uuid); + rc = lop->lop_connect(ctxt, logid, gen, uuid); RETURN(rc); } diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c index eff8e777ae6681f9d1ce6112035565a19cfbc47a..59d2e9d3b5d3358657e7bb7e6369cba3af270dbf 100644 --- a/lustre/lov/lov_log.c +++ b/lustre/lov/lov_log.c @@ -113,7 +113,7 @@ static int lov_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, RETURN(rc); } -static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count, +static int lov_llog_origin_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) @@ -124,7 +124,7 @@ static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count, ENTRY; lov_getref(obd); - for (i = 0; i < count; i++) { + for (i = 0; i < lov->desc.ld_tgt_count; i++) { struct obd_device *child; struct llog_ctxt *cctxt; @@ -132,10 +132,10 @@ static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count, continue; if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid)) continue; - CDEBUG(D_CONFIG, "connect %d/%d\n", i, count); + CDEBUG(D_CONFIG, "connect %d/%d\n", i, lov->desc.ld_tgt_count); child = lov->lov_tgts[i]->ltd_exp->exp_obd; cctxt = llog_get_context(child, ctxt->loc_idx); - rc = llog_connect(cctxt, 1, logid, gen, uuid); + rc = llog_connect(cctxt, logid, gen, uuid); llog_ctxt_put(cctxt); if (rc) { diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c index ca7fca03409bcad310d543bd209b54c790ff631d..2432035f8db8536e33629944e2e6376b4b4d738b 100644 --- a/lustre/mds/mds_log.c +++ b/lustre/mds/mds_log.c @@ -72,7 +72,7 @@ static int mds_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec, RETURN(rc); } -static int mds_llog_origin_connect(struct llog_ctxt *ctxt, int count, +static int mds_llog_origin_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) @@ -84,7 +84,7 @@ static int mds_llog_origin_connect(struct llog_ctxt *ctxt, int count, ENTRY; lctxt = llog_get_context(lov_obd, ctxt->loc_idx); - rc = llog_connect(lctxt, count, logid, gen, uuid); + rc = llog_connect(lctxt, logid, gen, uuid); llog_ctxt_put(lctxt); RETURN(rc); } diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index a77af7b523f813b1111a3c7a5686eded4b1e8760..339850899c9a6d5950f37fd25d565ef762562cd7 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -928,8 +928,7 @@ static int __mds_lov_synchronize(void *data) OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_LLOG_SYNC_TIMEOUT, 60); - rc = llog_connect(ctxt, obd->u.mds.mds_lov_desc.ld_tgt_count, - NULL, NULL, uuid); + rc = llog_connect(ctxt, NULL, NULL, uuid); llog_ctxt_put(ctxt); if (rc != 0) { diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c index 2a79e1d889636b646588669c4038edf2b1f2aa12..87e3566189b614438f17a63059fee118b9c96c4c 100644 --- a/lustre/ptlrpc/llog_net.c +++ b/lustre/ptlrpc/llog_net.c @@ -63,7 +63,7 @@ #include <lustre_fsfilt.h> #ifdef __KERNEL__ -int llog_origin_connect(struct llog_ctxt *ctxt, int count, +int llog_origin_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) { @@ -153,7 +153,7 @@ int llog_handle_connect(struct ptlrpc_request *req) sizeof(*req_body)); ctxt = llog_get_context(obd, req_body->lgdc_ctxt_idx); - rc = llog_connect(ctxt, 1, &req_body->lgdc_logid, + rc = llog_connect(ctxt, &req_body->lgdc_logid, &req_body->lgdc_gen, NULL); llog_ctxt_put(ctxt); @@ -184,7 +184,7 @@ EXPORT_SYMBOL(llog_receptor_accept); #else /* !__KERNEL__ */ -int llog_origin_connect(struct llog_ctxt *ctxt, int count, +int llog_origin_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) { diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 761c4727ad320738944dd96c2567b1ba8a149ff7..c524cc8645db8d66d17aeed955036baa45eae451 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -492,7 +492,7 @@ static int llog_recov_thread_replay(struct llog_ctxt *ctxt, RETURN(rc); } -int llog_obd_repl_connect(struct llog_ctxt *ctxt, int count, +int llog_obd_repl_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) {