without protection.
Branch HEAD
b=16693
i=umka
i=tappro
/* 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);
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);
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 */
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)
{
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);
}
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)
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;
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) {
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)
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);
}
GOTO(out, rc = -ENODEV);
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) {
CERROR("%s failed at llog_origin_connect: %d\n",
obd->obd_name, body->lgdc_logid.lgl_oid,
body->lgdc_logid.lgl_ogr, body->lgdc_logid.lgl_ogen);
- rc = llog_connect(ctxt, 1, &body->lgdc_logid,
+ rc = llog_connect(ctxt, &body->lgdc_logid,
&body->lgdc_gen, NULL);
llog_ctxt_put(ctxt);
if (rc != 0)
#include <lvfs.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)
{
req_body = req_capsule_client_get(&req->rq_pill, &RMF_LLOGD_CONN_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);
#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)
{
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)
{