struct lu_fid op_fid4; /* to the operation locks. */
u32 op_mds; /* what mds server open will go to */
__u32 op_mode;
- struct lustre_handle op_handle;
+ struct lustre_handle op_open_handle;
s64 op_mod_time;
const char *op_name;
size_t op_namelen;
};
struct obd_client_handle {
- struct lustre_handle och_fh;
+ struct lustre_handle och_open_handle;
struct lu_fid och_fid;
struct md_open_data *och_mod;
struct lustre_handle och_lease_handle; /* open lock for lease */
struct mdt_body {
struct lu_fid mbo_fid1;
struct lu_fid mbo_fid2;
- struct lustre_handle mbo_handle;
+ struct lustre_handle mbo_open_handle;
__u64 mbo_valid;
__u64 mbo_size; /* Offset, in the case of MDS_READPAGE */
__s64 mbo_mtime;
}; /* 216 */
struct mdt_ioepoch {
- struct lustre_handle mio_handle;
+ struct lustre_handle mio_open_handle;
__u64 mio_unused1; /* was ioepoch */
__u32 mio_unused2; /* was flags */
__u32 mio_padding;
/* instance of mdt_reint_rec */
struct mdt_rec_create {
- __u32 cr_opcode;
- __u32 cr_cap;
- __u32 cr_fsuid;
- __u32 cr_fsuid_h;
- __u32 cr_fsgid;
- __u32 cr_fsgid_h;
- __u32 cr_suppgid1;
- __u32 cr_suppgid1_h;
- __u32 cr_suppgid2;
- __u32 cr_suppgid2_h;
- struct lu_fid cr_fid1;
- struct lu_fid cr_fid2;
- struct lustre_handle cr_old_handle; /* handle in case of open replay */
+ __u32 cr_opcode;
+ __u32 cr_cap;
+ __u32 cr_fsuid;
+ __u32 cr_fsuid_h;
+ __u32 cr_fsgid;
+ __u32 cr_fsgid_h;
+ __u32 cr_suppgid1;
+ __u32 cr_suppgid1_h;
+ __u32 cr_suppgid2;
+ __u32 cr_suppgid2_h;
+ struct lu_fid cr_fid1;
+ struct lu_fid cr_fid2;
+ struct lustre_handle cr_open_handle_old; /* in case of open replay */
__s64 cr_time;
- __u64 cr_rdev;
- __u64 cr_ioepoch;
- __u64 cr_padding_1; /* rr_blocks */
- __u32 cr_mode;
- __u32 cr_bias;
- /* use of helpers set/get_mrc_cr_flags() is needed to access
- * 64 bits cr_flags [cr_flags_l, cr_flags_h], this is done to
- * extend cr_flags size without breaking 1.8 compat */
- __u32 cr_flags_l; /* for use with open, low 32 bits */
- __u32 cr_flags_h; /* for use with open, high 32 bits */
- __u32 cr_umask; /* umask for create */
- __u32 cr_padding_4; /* rr_padding_4 */
+ __u64 cr_rdev;
+ __u64 cr_ioepoch;
+ __u64 cr_padding_1; /* rr_blocks */
+ __u32 cr_mode;
+ __u32 cr_bias;
+ /* use of helpers set/get_mrc_cr_flags() is needed to access
+ * 64 bits cr_flags [cr_flags_l, cr_flags_h], this is done to
+ * extend cr_flags size without breaking 1.8 compat */
+ __u32 cr_flags_l; /* for use with open, low 32 bits */
+ __u32 cr_flags_h; /* for use with open, high 32 bits */
+ __u32 cr_umask; /* umask for create */
+ __u32 cr_padding_4; /* rr_padding_4 */
};
/* instance of mdt_reint_rec */
__u32 rs_suppgid2_h;
struct lu_fid rs_fid;
__u8 rs_padding0[sizeof(struct lu_fid)];
- struct lustre_handle rs_handle; /* rr_mtime */
+ struct lustre_handle rs_lease_handle; /* rr_mtime */
__s64 rs_padding1; /* rr_atime */
__s64 rs_padding2; /* rr_ctime */
__u64 rs_padding3; /* rr_size */
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;
}
}
op_data->op_fid1 = body->mbo_fid1;
- op_data->op_handle = body->mbo_handle;
+ op_data->op_open_handle = body->mbo_open_handle;
op_data->op_mod_time = ktime_get_real_seconds();
md_close(exp, op_data, NULL, &close_req);
ptlrpc_req_finished(close_req);
rec->cr_suppgid1 = op_data->op_suppgids[0];
rec->cr_suppgid2 = op_data->op_suppgids[1];
rec->cr_bias = op_data->op_bias;
- rec->cr_old_handle = op_data->op_handle;
+ rec->cr_open_handle_old = op_data->op_open_handle;
if (op_data->op_name) {
mdc_pack_name(req, &RMF_NAME, op_data->op_name,
static void mdc_ioepoch_pack(struct mdt_ioepoch *epoch,
struct md_op_data *op_data)
{
- epoch->mio_handle = op_data->op_handle;
+ epoch->mio_open_handle = op_data->op_open_handle;
epoch->mio_unused1 = 0;
epoch->mio_unused2 = 0;
epoch->mio_padding = 0;
rec->rs_fid = op_data->op_fid1;
rec->rs_bias = op_data->op_bias;
- lock = ldlm_handle2lock(&op_data->op_handle);
+ lock = ldlm_handle2lock(&op_data->op_lease_handle);
if (lock != NULL) {
- rec->rs_handle = lock->l_remote_handle;
+ rec->rs_lease_handle = lock->l_remote_handle;
LDLM_LOCK_PUT(lock);
}
void mdc_replay_open(struct ptlrpc_request *req)
{
- struct md_open_data *mod = req->rq_cb_data;
- struct ptlrpc_request *close_req;
- struct obd_client_handle *och;
- struct lustre_handle old;
- struct mdt_body *body;
- ENTRY;
+ struct md_open_data *mod = req->rq_cb_data;
+ struct ptlrpc_request *close_req;
+ struct obd_client_handle *och;
+ struct lustre_handle old_open_handle = { };
+ struct mdt_body *body;
+ ENTRY;
- if (mod == NULL) {
- DEBUG_REQ(D_ERROR, req,
- "Can't properly replay without open data.");
- EXIT;
- return;
- }
+ if (mod == NULL) {
+ DEBUG_REQ(D_ERROR, req,
+ "Can't properly replay without open data.");
+ EXIT;
+ return;
+ }
- body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
- LASSERT(body != NULL);
+ body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
+ LASSERT(body != NULL);
spin_lock(&req->rq_lock);
och = mod->mod_och;
- if (och && och->och_fh.cookie)
+ if (och && och->och_open_handle.cookie)
req->rq_early_free_repbuf = 1;
else
req->rq_early_free_repbuf = 0;
spin_unlock(&req->rq_lock);
if (req->rq_early_free_repbuf) {
- struct lustre_handle *file_fh;
+ struct lustre_handle *file_open_handle;
LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC);
- file_fh = &och->och_fh;
+ file_open_handle = &och->och_open_handle;
CDEBUG(D_HA, "updating handle from %#llx to %#llx\n",
- file_fh->cookie, body->mbo_handle.cookie);
- old = *file_fh;
- *file_fh = body->mbo_handle;
+ file_open_handle->cookie, body->mbo_open_handle.cookie);
+ old_open_handle = *file_open_handle;
+ *file_open_handle = body->mbo_open_handle;
}
close_req = mod->mod_close_req;
LASSERT(epoch);
if (req->rq_early_free_repbuf)
- LASSERT(!memcmp(&old, &epoch->mio_handle, sizeof(old)));
+ LASSERT(old_open_handle.cookie ==
+ epoch->mio_open_handle.cookie);
DEBUG_REQ(D_HA, close_req, "updating close body with new fh");
- epoch->mio_handle = body->mbo_handle;
+ epoch->mio_open_handle = body->mbo_open_handle;
}
EXIT;
}
open_req->rq_commit_cb = mdc_commit_open;
open_req->rq_early_free_repbuf = 1;
spin_unlock(&open_req->rq_lock);
- }
+ }
rec->cr_fid2 = body->mbo_fid1;
- rec->cr_old_handle.cookie = body->mbo_handle.cookie;
+ rec->cr_open_handle_old = body->mbo_open_handle;
open_req->rq_replay_cb = mdc_replay_open;
if (!fid_is_sane(&body->mbo_fid1)) {
- DEBUG_REQ(D_ERROR, open_req, "Saving replay request with "
- "insane fid");
- LBUG();
- }
+ DEBUG_REQ(D_ERROR, open_req,
+ "saving replay request with insane FID " DFID,
+ PFID(&body->mbo_fid1));
+ LBUG();
+ }
- DEBUG_REQ(D_RPCTRACE, open_req, "Set up open replay data");
- RETURN(0);
+ DEBUG_REQ(D_RPCTRACE, open_req, "Set up open replay data");
+ RETURN(0);
}
static void mdc_free_open(struct md_open_data *mod)
spin_lock(&mod->mod_open_req->rq_lock);
if (mod->mod_och)
- mod->mod_och->och_fh.cookie = 0;
+ mod->mod_och->och_open_handle.cookie = 0;
mod->mod_open_req->rq_early_free_repbuf = 0;
spin_unlock(&mod->mod_open_req->rq_lock);
mdc_free_open(mod);
#include "mdt_internal.h"
-
static unsigned int max_mod_rpcs_per_client = 8;
module_param(max_mod_rpcs_per_client, uint, 0644);
MODULE_PARM_DESC(max_mod_rpcs_per_client, "maximum number of modify RPCs in flight allowed per client");
/* Remove mfd handle so it can't be found again.
* We are consuming the mfd_list reference here. */
- class_handle_unhash(&mfd->mfd_handle);
+ class_handle_unhash(&mfd->mfd_open_handle);
list_move_tail(&mfd->mfd_list, &closing_list);
}
spin_unlock(&med->med_open_lock);
/* file data for open files on MDS */
struct mdt_file_data {
/** portals handle must be first */
- struct portals_handle mfd_handle;
+ struct portals_handle mfd_open_handle;
/** open mode provided by client */
__u64 mfd_mode;
/** protected by med_open_lock */
/** xid of the open request */
__u64 mfd_xid;
/** old handle in replay case */
- struct lustre_handle mfd_old_handle;
+ struct lustre_handle mfd_open_handle_old;
/** point to opened object */
struct mdt_object *mfd_object;
};
struct mdt_reint_record {
enum mds_reint_op rr_opcode;
- const struct lustre_handle *rr_handle;
+ const struct lustre_handle *rr_open_handle;
+ const struct lustre_handle *rr_lease_handle;
const struct lu_fid *rr_fid1;
const struct lu_fid *rr_fid2;
struct lu_name rr_name;
} som;
} mti_u;
- struct lustre_handle mti_close_handle;
- loff_t mti_off;
- struct lu_buf mti_buf;
- struct lu_buf mti_big_buf;
+ struct lustre_handle mti_open_handle;
+ loff_t mti_off;
+ struct lu_buf mti_buf;
+ struct lu_buf mti_big_buf;
/* Ops object filename */
struct lu_name mti_name;
__u64 mode);
int mdt_reint_open(struct mdt_thread_info *info,
- struct mdt_lock_handle *lhc);
+ struct mdt_lock_handle *lhc);
-struct mdt_file_data *mdt_handle2mfd(struct mdt_export_data *med,
- const struct lustre_handle *handle,
- bool is_replay);
+struct mdt_file_data *mdt_open_handle2mfd(struct mdt_export_data *med,
+ const struct lustre_handle *open_handle,
+ bool is_replay);
int mdt_get_info(struct tgt_session_info *tsi);
int mdt_attr_get_complex(struct mdt_thread_info *info,
if (ioepoch == NULL)
RETURN(-EPROTO);
- info->mti_close_handle = ioepoch->mio_handle;
+ info->mti_open_handle = ioepoch->mio_open_handle;
RETURN(0);
}
uc->uc_suppgids[1] = rec->cr_suppgid2;
uc->uc_umask = rec->cr_umask;
- rr->rr_fid1 = &rec->cr_fid1;
- rr->rr_fid2 = &rec->cr_fid2;
- rr->rr_handle = &rec->cr_old_handle;
- attr->la_mode = rec->cr_mode;
- attr->la_rdev = rec->cr_rdev;
- attr->la_uid = rec->cr_fsuid;
- attr->la_gid = rec->cr_fsgid;
- attr->la_ctime = rec->cr_time;
- attr->la_mtime = rec->cr_time;
- attr->la_atime = rec->cr_time;
- attr->la_valid = LA_MODE | LA_RDEV | LA_UID | LA_GID |
- LA_CTIME | LA_MTIME | LA_ATIME;
+ rr->rr_fid1 = &rec->cr_fid1;
+ rr->rr_fid2 = &rec->cr_fid2;
+ rr->rr_open_handle = &rec->cr_open_handle_old;
+ attr->la_mode = rec->cr_mode;
+ attr->la_rdev = rec->cr_rdev;
+ attr->la_uid = rec->cr_fsuid;
+ attr->la_gid = rec->cr_fsgid;
+ attr->la_ctime = rec->cr_time;
+ attr->la_mtime = rec->cr_time;
+ attr->la_atime = rec->cr_time;
+ attr->la_valid = LA_MODE | LA_RDEV | LA_UID | LA_GID |
+ LA_CTIME | LA_MTIME | LA_ATIME;
memset(&info->mti_spec.u, 0, sizeof(info->mti_spec.u));
info->mti_spec.sp_cr_flags = get_mrc_cr_flags(rec);
/* Do not trigger ASSERTION if client miss to set such flags. */
* in lustre_swab_mdt_rec_reint() as rr_mtime, so here it needs
* restoring. */
if (ptlrpc_req_need_swab(mdt_info_req(info)))
- __swab64s(&rec->rs_handle.cookie);
- rr->rr_handle = &rec->rs_handle;
+ __swab64s(&rec->rs_lease_handle.cookie);
+ rr->rr_lease_handle = &rec->rs_lease_handle;
RETURN(mdt_dlmreq_unpack(info));
}
{
}
-static struct portals_handle_ops mfd_handle_ops = {
+static struct portals_handle_ops mfd_open_handle_ops = {
.hop_addref = mdt_mfd_get,
.hop_free = NULL,
};
OBD_ALLOC_PTR(mfd);
if (mfd != NULL) {
- INIT_LIST_HEAD(&mfd->mfd_handle.h_link);
- mfd->mfd_handle.h_owner = med;
+ INIT_LIST_HEAD(&mfd->mfd_open_handle.h_link);
+ mfd->mfd_open_handle.h_owner = med;
INIT_LIST_HEAD(&mfd->mfd_list);
- class_handle_hash(&mfd->mfd_handle, &mfd_handle_ops);
+ class_handle_hash(&mfd->mfd_open_handle, &mfd_open_handle_ops);
}
RETURN(mfd);
* but mfd can be found in mfd list by that handle.
* Callers need to be holding med_open_lock.
*/
-struct mdt_file_data *mdt_handle2mfd(struct mdt_export_data *med,
- const struct lustre_handle *handle,
- bool is_replay_or_resent)
+struct mdt_file_data *mdt_open_handle2mfd(struct mdt_export_data *med,
+ const struct lustre_handle *open_handle,
+ bool is_replay_or_resent)
{
struct mdt_file_data *mfd;
ENTRY;
- LASSERT(handle != NULL);
- mfd = class_handle2object(handle->cookie, med);
+ LASSERT(open_handle != NULL);
+ mfd = class_handle2object(open_handle->cookie, med);
/* during dw/setattr replay the mfd can be found by old handle */
if (mfd == NULL && is_replay_or_resent) {
list_for_each_entry(mfd, &med->med_open_head, mfd_list) {
- if (mfd->mfd_old_handle.cookie == handle->cookie)
+ if (mfd->mfd_open_handle_old.cookie ==
+ open_handle->cookie)
RETURN(mfd);
}
mfd = NULL;
void mdt_mfd_free(struct mdt_file_data *mfd)
{
LASSERT(list_empty(&mfd->mfd_list));
- OBD_FREE_RCU(mfd, sizeof *mfd, &mfd->mfd_handle);
+ OBD_FREE_RCU(mfd, sizeof *mfd, &mfd->mfd_open_handle);
}
static int mdt_create_data(struct mdt_thread_info *info,
* might be disconnected from server, and
* restart replay, so there maybe some orphan
* mfd here, we should remove them */
- LASSERT(info->mti_rr.rr_handle != NULL);
+ LASSERT(info->mti_rr.rr_open_handle != NULL);
spin_lock(&med->med_open_lock);
- old_mfd = mdt_handle2mfd(med, info->mti_rr.rr_handle, true);
+ old_mfd = mdt_open_handle2mfd(med, info->mti_rr.rr_open_handle,
+ true);
if (old_mfd != NULL) {
CDEBUG(D_HA, "delete orphan mfd = %p, fid = "DFID", "
"cookie = %#llx\n", mfd,
PFID(mdt_object_fid(mfd->mfd_object)),
- info->mti_rr.rr_handle->cookie);
- class_handle_unhash(&old_mfd->mfd_handle);
+ info->mti_rr.rr_open_handle->cookie);
+ class_handle_unhash(&old_mfd->mfd_open_handle);
list_del_init(&old_mfd->mfd_list);
spin_unlock(&med->med_open_lock);
/* no attr update for that close */
CDEBUG(D_HA, "orphan mfd not found, fid = "DFID", "
"cookie = %#llx\n",
PFID(mdt_object_fid(mfd->mfd_object)),
- info->mti_rr.rr_handle->cookie);
+ info->mti_rr.rr_open_handle->cookie);
}
CDEBUG(D_HA, "Store old cookie %#llx in new mfd\n",
- info->mti_rr.rr_handle->cookie);
+ info->mti_rr.rr_open_handle->cookie);
- mfd->mfd_old_handle.cookie = info->mti_rr.rr_handle->cookie;
+ mfd->mfd_open_handle_old = *info->mti_rr.rr_open_handle;
}
- repbody->mbo_handle.cookie = mfd->mfd_handle.h_cookie;
+ repbody->mbo_open_handle.cookie = mfd->mfd_open_handle.h_cookie;
if (req->rq_export->exp_disconnected) {
spin_lock(&med->med_open_lock);
- class_handle_unhash(&mfd->mfd_handle);
+ class_handle_unhash(&mfd->mfd_open_handle);
list_del_init(&mfd->mfd_list);
spin_unlock(&med->med_open_lock);
mdt_mfd_close(info, mfd);
}
spin_unlock(&med->med_open_lock);
- if (mfd != NULL) {
- repbody->mbo_handle.cookie = mfd->mfd_handle.h_cookie;
+ if (mfd != NULL) {
+ repbody->mbo_open_handle.cookie =
+ mfd->mfd_open_handle.h_cookie;
/* set repbody->ea_size for resent case */
if (ma->ma_valid & MA_LOV) {
LASSERT(ma->ma_lmm_size != 0);
is_replay_or_resent = req_is_replay(req) ||
lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT;
- /* if the request is _not_ a replay request, rr_handle
- * may be used to hold an openhandle which is issuing the
+ /* if the request is _not_ a replay request, rr_open_handle
+ * may be used to hold an open file handle which is issuing the
* lease request, so that this openhandle doesn't count. */
- mfd = mdt_handle2mfd(med, info->mti_rr.rr_handle,
- is_replay_or_resent);
+ mfd = mdt_open_handle2mfd(med, info->mti_rr.rr_open_handle,
+ is_replay_or_resent);
if (mfd != NULL)
++open_count;
med = &req->rq_export->exp_mdt_data;
spin_lock(&med->med_open_lock);
- mfd = mdt_handle2mfd(med, &info->mti_close_handle, req_is_replay(req));
+ mfd = mdt_open_handle2mfd(med, &info->mti_open_handle,
+ req_is_replay(req));
if (mdt_mfd_closed(mfd)) {
spin_unlock(&med->med_open_lock);
CDEBUG(D_INODE, "no handle for file close: fid = "DFID
": cookie = %#llx\n", PFID(info->mti_rr.rr_fid1),
- info->mti_close_handle.cookie);
+ info->mti_open_handle.cookie);
/** not serious error since bug 3633 */
rc = -ESTALE;
} else {
- class_handle_unhash(&mfd->mfd_handle);
+ class_handle_unhash(&mfd->mfd_open_handle);
list_del_init(&mfd->mfd_list);
spin_unlock(&med->med_open_lock);
ret = mdt_mfd_close(info, mfd);
ma->ma_need = MA_INODE | MA_LOV;
repbody->mbo_eadatasize = 0;
repbody->mbo_aclsize = 0;
- } else {
- rc = err_serious(rc);
- }
+ } else {
+ rc = err_serious(rc);
+ }
rc = mdt_close_internal(info, req, repbody);
if (rc != -ESTALE)
if (mdt_object_remote(mo))
GOTO(out_obj, rc = -EREMOTE);
- lease = ldlm_handle2lock(rr->rr_handle);
+ lease = ldlm_handle2lock(rr->rr_lease_handle);
if (lease == NULL)
GOTO(out_obj, rc = -ESTALE);
void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b)
{
- /* mio_handle is opaque */
+ /* mio_open_handle is opaque */
CLASSERT(offsetof(typeof(*b), mio_unused1) != 0);
CLASSERT(offsetof(typeof(*b), mio_unused2) != 0);
CLASSERT(offsetof(typeof(*b), mio_padding) != 0);
(long long)(int)offsetof(struct mdt_body, mbo_fid2));
LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid2) == 16, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid2));
- LASSERTF((int)offsetof(struct mdt_body, mbo_handle) == 32, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, mbo_handle));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_handle) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->mbo_handle));
+ LASSERTF((int)offsetof(struct mdt_body, mbo_open_handle) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, mbo_open_handle));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_open_handle) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->mbo_open_handle));
LASSERTF((int)offsetof(struct mdt_body, mbo_valid) == 40, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, mbo_valid));
LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_valid) == 8, "found %lld\n",
/* Checks for struct mdt_ioepoch */
LASSERTF((int)sizeof(struct mdt_ioepoch) == 24, "found %lld\n",
(long long)(int)sizeof(struct mdt_ioepoch));
- LASSERTF((int)offsetof(struct mdt_ioepoch, mio_handle) == 0, "found %lld\n",
- (long long)(int)offsetof(struct mdt_ioepoch, mio_handle));
- LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_handle) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_handle));
+ LASSERTF((int)offsetof(struct mdt_ioepoch, mio_open_handle) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_ioepoch, mio_open_handle));
+ LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_open_handle) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_open_handle));
LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused1) == 8, "found %lld\n",
(long long)(int)offsetof(struct mdt_ioepoch, mio_unused1));
LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1) == 8, "found %lld\n",
(long long)(int)offsetof(struct mdt_rec_create, cr_fid2));
LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid2) == 16, "found %lld\n",
(long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid2));
- LASSERTF((int)offsetof(struct mdt_rec_create, cr_old_handle) == 72, "found %lld\n",
- (long long)(int)offsetof(struct mdt_rec_create, cr_old_handle));
- LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle));
+ LASSERTF((int)offsetof(struct mdt_rec_create, cr_open_handle_old) == 72, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_rec_create, cr_open_handle_old));
+ LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_open_handle_old) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_open_handle_old));
LASSERTF((int)offsetof(struct mdt_rec_create, cr_time) == 80, "found %lld\n",
(long long)(int)offsetof(struct mdt_rec_create, cr_time));
LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_time) == 8, "found %lld\n",
CHECK_STRUCT(mdt_body);
CHECK_MEMBER(mdt_body, mbo_fid1);
CHECK_MEMBER(mdt_body, mbo_fid2);
- CHECK_MEMBER(mdt_body, mbo_handle);
+ CHECK_MEMBER(mdt_body, mbo_open_handle);
CHECK_MEMBER(mdt_body, mbo_valid);
CHECK_MEMBER(mdt_body, mbo_size);
CHECK_MEMBER(mdt_body, mbo_mtime);
{
BLANK_LINE();
CHECK_STRUCT(mdt_ioepoch);
- CHECK_MEMBER(mdt_ioepoch, mio_handle);
+ CHECK_MEMBER(mdt_ioepoch, mio_open_handle);
CHECK_MEMBER(mdt_ioepoch, mio_unused1);
CHECK_MEMBER(mdt_ioepoch, mio_unused2);
CHECK_MEMBER(mdt_ioepoch, mio_padding);
CHECK_MEMBER(mdt_rec_create, cr_suppgid2_h);
CHECK_MEMBER(mdt_rec_create, cr_fid1);
CHECK_MEMBER(mdt_rec_create, cr_fid2);
- CHECK_MEMBER(mdt_rec_create, cr_old_handle);
+ CHECK_MEMBER(mdt_rec_create, cr_open_handle_old);
CHECK_MEMBER(mdt_rec_create, cr_time);
CHECK_MEMBER(mdt_rec_create, cr_rdev);
CHECK_MEMBER(mdt_rec_create, cr_ioepoch);
(long long)(int)offsetof(struct mdt_body, mbo_fid2));
LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_fid2) == 16, "found %lld\n",
(long long)(int)sizeof(((struct mdt_body *)0)->mbo_fid2));
- LASSERTF((int)offsetof(struct mdt_body, mbo_handle) == 32, "found %lld\n",
- (long long)(int)offsetof(struct mdt_body, mbo_handle));
- LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_handle) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_body *)0)->mbo_handle));
+ LASSERTF((int)offsetof(struct mdt_body, mbo_open_handle) == 32, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_body, mbo_open_handle));
+ LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_open_handle) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_body *)0)->mbo_open_handle));
LASSERTF((int)offsetof(struct mdt_body, mbo_valid) == 40, "found %lld\n",
(long long)(int)offsetof(struct mdt_body, mbo_valid));
LASSERTF((int)sizeof(((struct mdt_body *)0)->mbo_valid) == 8, "found %lld\n",
/* Checks for struct mdt_ioepoch */
LASSERTF((int)sizeof(struct mdt_ioepoch) == 24, "found %lld\n",
(long long)(int)sizeof(struct mdt_ioepoch));
- LASSERTF((int)offsetof(struct mdt_ioepoch, mio_handle) == 0, "found %lld\n",
- (long long)(int)offsetof(struct mdt_ioepoch, mio_handle));
- LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_handle) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_handle));
+ LASSERTF((int)offsetof(struct mdt_ioepoch, mio_open_handle) == 0, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_ioepoch, mio_open_handle));
+ LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_open_handle) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_ioepoch *)0)->mio_open_handle));
LASSERTF((int)offsetof(struct mdt_ioepoch, mio_unused1) == 8, "found %lld\n",
(long long)(int)offsetof(struct mdt_ioepoch, mio_unused1));
LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->mio_unused1) == 8, "found %lld\n",
(long long)(int)offsetof(struct mdt_rec_create, cr_fid2));
LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_fid2) == 16, "found %lld\n",
(long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_fid2));
- LASSERTF((int)offsetof(struct mdt_rec_create, cr_old_handle) == 72, "found %lld\n",
- (long long)(int)offsetof(struct mdt_rec_create, cr_old_handle));
- LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_old_handle));
+ LASSERTF((int)offsetof(struct mdt_rec_create, cr_open_handle_old) == 72, "found %lld\n",
+ (long long)(int)offsetof(struct mdt_rec_create, cr_open_handle_old));
+ LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_open_handle_old) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct mdt_rec_create *)0)->cr_open_handle_old));
LASSERTF((int)offsetof(struct mdt_rec_create, cr_time) == 80, "found %lld\n",
(long long)(int)offsetof(struct mdt_rec_create, cr_time));
LASSERTF((int)sizeof(((struct mdt_rec_create *)0)->cr_time) == 8, "found %lld\n",