- typo fix in mds_set_info.
struct lmv_tgt_desc *tgt;
struct obd_device *obd;
struct lmv_obd *lmv;
+ int rc = 0;
ENTRY;
obd = class_exp2obd(exp);
(keylen == strlen("sec_flags") && strcmp(key, "sec_flags") == 0) ||
(keylen == strlen("nllu") && strcmp(key, "nllu") == 0)) {
struct obd_export *exp;
- int rc = 0, err, i;
+ int err, i;
spin_lock(&lmv->lmv_lock);
for (i = 0, tgt = lmv->tgts; i < lmv->desc.ld_tgt_count;
if (keylen == 5 && strcmp(key, "audit") == 0) {
struct audit_attr_msg * msg = val;
int mds = id_group(&msg->id);
- int i, rc = 0;
+ int i;
LASSERT(mds < lmv->desc.ld_tgt_count);
if (IS_AUDIT_OP(msg->attr, AUDIT_FS)) {
strcmp(key, "flush_cred") == 0)) ||
((keylen == strlen("crypto_type") &&
strcmp(key, "crypto_type") == 0))) {
- int rc = 0, i;
+ int i;
for (i = 0, tgt = lmv->tgts; i < lmv->desc.ld_tgt_count;
i++, tgt++) {
RETURN(0);
}
+
+ if (keylen == strlen("ids") && memcmp(key, "ids", keylen) == 0) {
+ struct lustre_id *id = (struct lustre_id *)val;
+
+ rc = lmv_check_connect(obd);
+ if (rc)
+ RETURN(rc);
+
+ rc = obd_set_info(lmv->tgts[id_group(id)].ltd_exp,
+ keylen, key, vallen, val);
+ RETURN(rc);
+ }
RETURN(-EINVAL);
}
de = mds_id2dentry(obd, ids, NULL);
if (IS_ERR(de)) {
rc = PTR_ERR(de);
- CERROR("lookup by an id error %d\n", rc);
+ CERROR("lookup by an id error rc=%d\n ", rc);
RETURN(rc);
}
inode = de->d_inode;
RETURN(rc);
id = lustre_swab_reqbuf(req, 1, sizeof(struct lustre_id),
lustre_swab_lustre_id);
- ids[1] = *id;
+ ids[0] = *id;
id = lustre_swab_reqbuf(req, 2, sizeof(struct lustre_id),
lustre_swab_lustre_id);
- ids[2] = *id;
+ ids[1] = *id;
rc = obd_set_info(exp, keylen, key, vallen, ids);
req->rq_repmsg->status = rc;
GOTO(cleanup, rc);
ids[0] = *(rec->ur_id1);
- rc = obd_set_info(mds->mds_md_obd->u.lmv.tgts[id_group(rec->ur_id1)].ltd_exp,
- strlen("ids"), "ids",
+ rc = obd_set_info(mds->mds_md_exp, strlen("ids"), "ids",
sizeof(struct lustre_id) * 2, ids);
EXIT;
if (de_old->d_flags & DCACHE_CROSS_REF) {
struct lustre_id old_id;
- struct obd_export *tgt_exp =
- mds->mds_md_obd->u.lmv.tgts[de_old->d_mdsnum].ltd_exp;
mds_pack_dentry2id(obd, &old_id, de_old, 1);
GOTO(cleanup, rc);
ids[0] = old_id;
- rc = obd_set_info(tgt_exp, strlen("ids"), "ids",
+ rc = obd_set_info(mds->mds_md_exp, strlen("ids"), "ids",
sizeof(struct lustre_id) * 2, ids);
GOTO(cleanup, rc);