static int client_obd_connect(struct obd_device *obd, char *name,
struct lustre_handle *conn,
+ struct obd_connect_data *data,
unsigned long flags)
{
struct obd_device *cli_obd;
obd->obd_name, name);
RETURN(-EINVAL);
}
- rc = obd_connect(conn, cli_obd, &obd->obd_uuid, flags);
+ rc = obd_connect(conn, cli_obd, &obd->obd_uuid, data, flags);
if (rc) {
CERROR("error connecting to %s, err %d\n",
name, rc);
static int
cobd_connect(struct lustre_handle *conn, struct obd_device *obd,
- struct obd_uuid *cluuid, unsigned long flags)
+ struct obd_uuid *cluuid, struct obd_connect_data *data,
+ unsigned long flags)
{
struct lustre_handle cache_conn = { 0 };
struct cache_obd *cobd = &obd->u.cobd;
/* connecting cache */
rc = client_obd_connect(obd, cobd->cache_name,
- &cache_conn, flags);
+ &cache_conn, data, flags);
if (rc)
GOTO(err_discon, rc);
cobd->cache_exp = class_conn2export(&cache_conn);
}
static int cobd_getattr(struct obd_export *exp, struct obdo *oa,
- struct lov_stripe_md *lsm)
+ struct lov_stripe_md *ea)
{
struct obd_device *obd = class_exp2obd(exp);
struct obd_export *cobd_exp;
return -EINVAL;
}
cobd_exp = cobd_get_exp(obd);
- return obd_getattr(cobd_exp, oa, lsm);
+ return obd_getattr(cobd_exp, oa, ea);
}
static int cobd_getattr_async(struct obd_export *exp,
struct lustre_handle conn = {0};
rc = client_obd_disconnect(obd, cobd->master_exp, 0);
- rc = client_obd_connect(obd, cobd->cache_name, &conn, 0);
+ rc = client_obd_connect(obd, cobd->cache_name, &conn,
+ NULL, 0);
if (rc)
GOTO(out, rc);
cobd->cache_exp = class_conn2export(&conn);
cooksize = cache->u.cli.cl_max_mds_cookiesize;
rc = client_obd_disconnect(obd, cobd->cache_exp, 0);
- rc = client_obd_connect(obd, cobd->master_name, &conn, 0);
+ rc = client_obd_connect(obd, cobd->master_name, &conn,
+ NULL, 0);
if (rc)
GOTO(out, rc);
cobd->master_exp = class_conn2export(&conn);
}
static int cobd_md_getattr(struct obd_export *exp, struct lustre_id *id,
- __u64 valid, unsigned int ea_size,
- struct ptlrpc_request **request)
+ __u64 valid, const char *ea_name, int ea_namelen,
+ unsigned int ea_size, struct ptlrpc_request **request)
{
struct obd_device *obd = class_exp2obd(exp);
struct obd_export *cobd_exp;
return -EINVAL;
}
cobd_exp = cobd_get_exp(obd);
- return md_getattr(cobd_exp, id, valid, ea_size, request);
+ return md_getattr(cobd_exp, id, valid, NULL, 0, ea_size, request);
}
static int cobd_md_req2lustre_md (struct obd_export *mdc_exp,
}
static struct obd_device *cobd_md_get_real_obd(struct obd_export *exp,
- char *name, int len)
+ struct lustre_id *id)
{
struct obd_device *obd = class_exp2obd(exp);
struct obd_export *cobd_exp;
return NULL;
}
cobd_exp = cobd_get_exp(obd);
- return md_get_real_obd(cobd_exp, name, len);
+ return md_get_real_obd(cobd_exp, id);
}
static int cobd_md_change_cbdata_name(struct obd_export *exp,