add fid init/fini for cmm/mdc.
mdc->obd_name, rc);
} else {
desc->cl_exp = class_conn2export(conn);
mdc->obd_name, rc);
} else {
desc->cl_exp = class_conn2export(conn);
+
+ rc = obd_fid_init(desc->cl_exp);
+ if (rc)
+ CERROR("fid init error %d \n", rc);
CDEBUG(D_CONFIG, "disconnect from %s\n",
class_exp2obd(desc->cl_exp)->obd_name);
CDEBUG(D_CONFIG, "disconnect from %s\n",
class_exp2obd(desc->cl_exp)->obd_name);
+
+ rc = obd_fid_fini(desc->cl_exp);
+ if (rc)
+ CERROR("fid init error %d \n", rc);
+
rc = obd_disconnect(desc->cl_exp);
if (rc) {
CERROR("target %s disconnect error %d\n",
rc = obd_disconnect(desc->cl_exp);
if (rc) {
CERROR("target %s disconnect error %d\n",
static int mdc_fid_init(struct obd_export *exp)
{
struct client_obd *cli = &exp->exp_obd->u.cli;
static int mdc_fid_init(struct obd_export *exp)
{
struct client_obd *cli = &exp->exp_obd->u.cli;
if (cli->cl_seq == NULL)
RETURN(-ENOMEM);
if (cli->cl_seq == NULL)
RETURN(-ENOMEM);
+ OBD_ALLOC(uuid, MAX_OBD_NAME + 5);
+ if (uuid == NULL)
+ GOTO(out_free_seq, rc = -ENOMEM);
+
+ snprintf(uuid, MAX_OBD_NAME + 5, "mgr-%s",
+ exp->exp_obd->obd_name);
/* init client side sequence-manager */
/* init client side sequence-manager */
- rc = seq_client_init(cli->cl_seq,
- exp->exp_obd->obd_name,
+ rc = seq_client_init(cli->cl_seq, uuid,
exp, LUSTRE_SEQ_METADATA);
exp, LUSTRE_SEQ_METADATA);
+ OBD_FREE(uuid, MAX_OBD_NAME + 5);
if (rc)
GOTO(out_free_seq, rc);
if (rc)
GOTO(out_free_seq, rc);
OBD_ALLOC_PTR(ls->ls_client_seq);
if (ls->ls_client_seq != NULL) {
OBD_ALLOC_PTR(ls->ls_client_seq);
if (ls->ls_client_seq != NULL) {
+ char *uuid;
+
+ OBD_ALLOC(uuid, MAX_OBD_NAME + 5);
+ if (!uuid)
+ RETURN(-ENOMEM);
+
+ snprintf(uuid, MAX_OBD_NAME + 5, "ctl-%s",
+ mdc->obd_name);
+
rc = seq_client_init(ls->ls_client_seq,
rc = seq_client_init(ls->ls_client_seq,
- mdc->obd_name,
- ls->ls_client_exp,
+ uuid, ls->ls_client_exp,
+ OBD_FREE(uuid, MAX_OBD_NAME + 5);
} else
rc = -ENOMEM;
if (rc)
RETURN(rc);
} else
rc = -ENOMEM;
if (rc)
RETURN(rc);
- /*FIXME: add client seq to mdc obd for
- *allocating fid in create slave objects,
- *may need better way to fix it,
- *why not init client seq in cmm_add_mdc?*/
- mdc->u.cli.cl_seq = ls->ls_client_seq;
LASSERT(ls->ls_server_seq != NULL);
LASSERT(ls->ls_server_seq != NULL);