* revalidate slaves has some problems, temporarily return,
* we may not need that
*/
- if (lsm->lsm_md_stripe_count <= 1)
- RETURN(0);
-
OBD_ALLOC_PTR(op_data);
if (op_data == NULL)
RETURN(-ENOMEM);
fid = lsm->lsm_md_oinfo[i].lmo_fid;
inode = lsm->lsm_md_oinfo[i].lmo_root;
- if (i == 0) {
- if (mbody != NULL) {
- body = mbody;
- goto update;
- } else {
- goto release_lock;
- }
- }
/*
* Prepare op_data for revalidating. Note that @fid2 shluld be
body = req_capsule_server_get(&req->rq_pill,
&RMF_MDT_BODY);
LASSERT(body != NULL);
-update:
if (unlikely(body->nlink < 2)) {
CERROR("%s: nlink %d < 2 corrupt stripe %d "DFID
":" DFID"\n", obd->obd_name, body->nlink,
GOTO(cleanup, rc = -EIO);
}
- if (i != 0)
- md_set_lock_data(tgt->ltd_exp, &lockh->cookie,
- inode, NULL);
i_size_write(inode, body->size);
set_nlink(inode, body->nlink);
if (req != NULL)
ptlrpc_req_finished(req);
}
-release_lock:
+
+ md_set_lock_data(tgt->ltd_exp, &lockh->cookie, inode, NULL);
+
size += i_size_read(inode);
if (i != 0)
* fid and setup FLD for it.
*/
op_data->op_fid3 = op_data->op_fid2;
- rc = lmv_fid_alloc(exp, &op_data->op_fid2, op_data);
+ rc = lmv_fid_alloc(NULL, exp, &op_data->op_fid2, op_data);
if (rc != 0)
RETURN(rc);
}
RETURN(rc);
}
RETURN(rc);
- } else if (it_disposition(it, DISP_LOOKUP_NEG) &&
- lsm != NULL && lsm->lsm_md_magic == LMV_MAGIC_MIGRATE) {
+ } else if (it_disposition(it, DISP_LOOKUP_NEG) && lsm != NULL &&
+ lsm->lsm_md_hash_type & LMV_HASH_FLAG_MIGRATION) {
/* For migrating directory, if it can not find the child in
* the source directory(master stripe), try the targeting
* directory(stripe 1) */
it->d.lustre.it_disposition &= ~DISP_ENQ_COMPLETE;
rc = md_intent_lock(tgt->ltd_exp, op_data, it, reqp,
cb_blocking, extra_lock_flags);
- RETURN(rc);
}
/*
* MDS has returned success. Probably name has been resolved in