op_data->op_attr_flags = ll_inode_to_ext_flags(inode->i_flags);
if (ll_file_test_flag(ll_i2info(inode), LLIF_PROJECT_INHERIT))
op_data->op_attr_flags |= LUSTRE_PROJINHERIT_FL;
- op_data->op_handle = och->och_fh;
+ op_data->op_open_handle = och->och_open_handle;
if (och->och_flags & FMODE_WRITE &&
ll_file_test_and_clear_flag(ll_i2info(inode), LLIF_DATA_MODIFIED))
out:
md_clear_open_replay_data(md_exp, och);
- och->och_fh.cookie = DEAD_HANDLE_MAGIC;
+ och->och_open_handle.cookie = DEAD_HANDLE_MAGIC;
OBD_FREE_PTR(och);
ptlrpc_req_finished(req); /* This is close request */
struct mdt_body *body;
body = req_capsule_server_get(&it->it_request->rq_pill, &RMF_MDT_BODY);
- och->och_fh = body->mbo_handle;
+ och->och_open_handle = body->mbo_open_handle;
och->och_fid = body->mbo_fid1;
och->och_lease_handle.cookie = it->it_lock_handle;
och->och_magic = OBD_CLIENT_HANDLE_MAGIC;
* if it has an open lock in cache already.
*/
static int ll_lease_och_acquire(struct inode *inode, struct file *file,
- struct lustre_handle *old_handle)
+ struct lustre_handle *old_open_handle)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
*och_p = NULL;
}
- *old_handle = fd->fd_och->och_fh;
+ *old_open_handle = fd->fd_och->och_open_handle;
EXIT;
out_unlock:
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct md_op_data *op_data;
struct ptlrpc_request *req = NULL;
- struct lustre_handle old_handle = { 0 };
+ struct lustre_handle old_open_handle = { 0 };
struct obd_client_handle *och = NULL;
int rc;
int rc2;
if (!(fmode & file->f_mode) || (file->f_mode & FMODE_EXEC))
RETURN(ERR_PTR(-EPERM));
- rc = ll_lease_och_acquire(inode, file, &old_handle);
+ rc = ll_lease_och_acquire(inode, file, &old_open_handle);
if (rc)
RETURN(ERR_PTR(rc));
}
GOTO(out, rc = PTR_ERR(op_data));
/* To tell the MDT this openhandle is from the same owner */
- op_data->op_handle = old_handle;
+ op_data->op_open_handle = old_open_handle;
it.it_flags = fmode | open_flags;
it.it_flags |= MDS_OPEN_LOCK | MDS_OPEN_BY_FID | MDS_OPEN_LEASE;
if (rc)
GOTO(out, rc);
- op_data->op_handle = och->och_lease_handle;
+ op_data->op_lease_handle = och->och_lease_handle;
rc = md_file_resync(sbi->ll_md_exp, op_data);
if (rc)
GOTO(out, rc);
if (rc != 0)
GOTO(out_close, rc);
- op_data->op_handle = och->och_fh;
+ op_data->op_open_handle = och->och_open_handle;
op_data->op_data_version = data_version;
op_data->op_lease_handle = och->och_lease_handle;
op_data->op_bias |= MDS_CLOSE_MIGRATE;
obd_mod_put(och->och_mod);
md_clear_open_replay_data(ll_i2sbi(parent)->ll_md_exp,
och);
- och->och_fh.cookie = DEAD_HANDLE_MAGIC;
+ och->och_open_handle.cookie = DEAD_HANDLE_MAGIC;
OBD_FREE_PTR(och);
och = NULL;
}