struct ptlrpc_request *req)
{
struct mds_obd *mds = mds_req2mds(req);
+ struct obd_device *obd = req->rq_export->exp_obd;
struct dentry *de;
void *handle;
struct lustre_handle child_lockh;
int namelen;
/* a name was supplied by the client; fid1 is the directory */
- dir = mds_fid2locked_dentry(mds, rec->ur_fid1, NULL, LCK_PR,
+ dir = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_PR,
&dir_lockh);
if (!dir || IS_ERR(dir)) {
l_dput(dir);
name = lustre_msg_buf(req->rq_reqmsg, offset + 1);
namelen = req->rq_reqmsg->buflens[offset + 1] - 1;
- de = mds_name2locked_dentry(mds, dir, NULL, name, namelen,
+ de = mds_name2locked_dentry(obd, dir, NULL, name, namelen,
0, &child_lockh, LCK_PR);
l_dput(dir);
if (!de || IS_ERR(de)) {
{
struct dentry *de = NULL;
struct mds_obd *mds = mds_req2mds(req);
+ struct obd_device *obd = req->rq_export->exp_obd;
struct dentry *dchild = NULL;
struct inode *dir;
void *handle;
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
res_id[0] = dir->i_ino;
- rc = ldlm_lock_match(mds->mds_local_namespace, res_id, LDLM_PLAIN,
+ rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &lockh);
if (rc == 0) {
LDLM_DEBUG_NOLOCK("enqueue res %Lu", res_id[0]);
- rc = ldlm_cli_enqueue(mds->mds_ldlm_client, mds->mds_ldlm_conn,
- (struct lustre_handle *)&mds->mds_connh,
- NULL, mds->mds_local_namespace, NULL,
+ rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, NULL,
res_id, LDLM_PLAIN, NULL, 0, lock_mode,
- &flags, (void *)mds_lock_callback, NULL,
+ &flags, ldlm_completion_ast, (void *)mds_lock_callback, NULL,
0, &lockh);
if (rc != ELDLM_OK) {
CERROR("lock enqueue: err: %d\n", rc);
/* If i_file_acl is set, this inode has an EA */
if (S_ISREG(inode->i_mode) && inode->u.ext3_i.i_file_acl) {
md = lustre_msg_buf(req->rq_repmsg, offset + 1);
- md->lmd_size = mds->mds_max_mdsize;
+ md->lmd_easize = mds->mds_max_mdsize;
mds_fs_get_md(mds, inode, md);
}
/* now a normal case for intent locking */
struct dentry *de = NULL;
struct dentry *dchild = NULL;
struct mds_obd *mds = mds_req2mds(req);
+ struct obd_device *obd = req->rq_export->exp_obd;
char *name;
int namelen;
struct inode *dir, *inode;
/* a name was supplied by the client; fid1 is the directory */
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
- de = mds_fid2locked_dentry(mds, rec->ur_fid1, NULL, lock_mode,
+ de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, lock_mode,
&lockh);
if (IS_ERR(de)) {
LBUG();
name = lustre_msg_buf(req->rq_reqmsg, offset + 1);
namelen = req->rq_reqmsg->buflens[offset + 1] - 1;
-
- dchild = mds_name2locked_dentry(mds, de, NULL, name, namelen,
- LCK_EX, &child_lockh, lock_mode);
+ dchild = mds_name2locked_dentry(obd, de, NULL, name, namelen,
+ LCK_EX, &child_lockh, lock_mode);
if (IS_ERR(dchild) || OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNLINK)) {
LBUG();
if (rc < 0) {
CDEBUG(D_INFO, "No md for ino %ld err %d\n",
inode->i_ino, rc);
- memset(md, 0, md->lmd_size);
+ memset(md, 0, md->lmd_easize);
}
}
default:
static int mds_reint_rename(struct mds_update_record *rec, int offset,
struct ptlrpc_request *req)
{
+ struct obd_device *obd = req->rq_export->exp_obd;
struct dentry *de_srcdir = NULL;
struct dentry *de_tgtdir = NULL;
struct dentry *de_old = NULL;
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
res_id[0] = de_srcdir->d_inode->i_ino;
- rc = ldlm_lock_match(mds->mds_local_namespace, res_id, LDLM_PLAIN,
+ rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &srclockh);
if (rc == 0) {
LDLM_DEBUG_NOLOCK("enqueue res %Lu", res_id[0]);
- rc = ldlm_cli_enqueue(mds->mds_ldlm_client, mds->mds_ldlm_conn,
- (struct lustre_handle *)&mds->mds_connh,
- NULL, mds->mds_local_namespace, NULL,
+ rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, NULL,
res_id, LDLM_PLAIN, NULL, 0, lock_mode,
- &flags, (void *)mds_lock_callback, NULL,
+ &flags, ldlm_completion_ast, (void *)mds_lock_callback, NULL,
0, &srclockh);
if (rc != ELDLM_OK) {
CERROR("lock enqueue: err: %d\n", rc);
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
res_id[0] = de_tgtdir->d_inode->i_ino;
- rc = ldlm_lock_match(mds->mds_local_namespace, res_id, LDLM_PLAIN,
+ rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &tgtlockh);
if (rc == 0) {
LDLM_DEBUG_NOLOCK("enqueue res %Lu", res_id[0]);
- rc = ldlm_cli_enqueue(mds->mds_ldlm_client, mds->mds_ldlm_conn,
- (struct lustre_handle *)&mds->mds_connh,
- NULL, mds->mds_local_namespace, NULL,
+ rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, NULL,
res_id, LDLM_PLAIN, NULL, 0, lock_mode,
- &flags, (void *)mds_lock_callback, NULL,
+ &flags, ldlm_completion_ast, (void *)mds_lock_callback, NULL,
0, &tgtlockh);
if (rc != ELDLM_OK) {
CERROR("lock enqueue: err: %d\n", rc);
* about to free, to force everyone to drop their
* locks. */
LDLM_DEBUG_NOLOCK("getting EX lock res %Lu", res_id[0]);
- rc = ldlm_cli_enqueue(mds->mds_ldlm_client, mds->mds_ldlm_conn,
- (struct lustre_handle *)&mds->mds_connh,
- NULL, mds->mds_local_namespace, NULL,
+ rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, NULL,
res_id,
LDLM_PLAIN, NULL, 0, LCK_EX, &flags,
- (void *)mds_lock_callback, NULL, 0,
+ ldlm_completion_ast, (void *)mds_lock_callback, NULL, 0,
&oldhandle);
if (rc)
CERROR("failed to get child inode lock (child ino %Ld, "