From: yury Date: Sat, 15 Apr 2006 13:52:25 +0000 (+0000) Subject: - different renames to make llite not working on mdc related structures directly X-Git-Tag: v1_8_0_110~486^2~1995 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=13c80028e3cfaeffc0df9853481ec6bf161ecc15;p=fs%2Flustre-release.git - different renames to make llite not working on mdc related structures directly --- diff --git a/lustre/include/linux/lustre_mdc.h b/lustre/include/linux/lustre_mdc.h index b817a23..d1bc98a 100644 --- a/lustre/include/linux/lustre_mdc.h +++ b/lustre/include/linux/lustre_mdc.h @@ -38,7 +38,7 @@ struct lustre_md { #endif }; -struct mdc_op_data { +struct md_op_data { struct lu_fid fid1; struct lu_fid fid2; __u64 mod_time; @@ -64,7 +64,7 @@ void mdc_set_lock_data(__u64 *lockh, void *data); int mdc_change_cbdata(struct obd_export *exp, struct lu_fid *fid, ldlm_iterator_t it, void *data); int mdc_intent_lock(struct obd_export *exp, - struct mdc_op_data *, + struct md_op_data *, void *lmm, int lmmsize, struct lookup_intent *, int, struct ptlrpc_request **reqp, @@ -73,7 +73,7 @@ int mdc_enqueue(struct obd_export *exp, int lock_type, struct lookup_intent *it, int lock_mode, - struct mdc_op_data *data, + struct md_op_data *op_data, struct lustre_handle *lockh, void *lmm, int lmmlen, @@ -95,7 +95,7 @@ int mdc_getattr(struct obd_export *exp, struct lu_fid *fid, int mdc_getattr_name(struct obd_export *exp, struct lu_fid *fid, const char *filename, int namelen, unsigned long valid, unsigned int ea_size, struct ptlrpc_request **request); -int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data, +int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len, struct ptlrpc_request **request); int mdc_setxattr(struct obd_export *exp, struct lu_fid *fid, @@ -114,18 +114,18 @@ struct obd_client_handle; void mdc_set_open_replay_data(struct obd_client_handle *och, struct ptlrpc_request *open_req); void mdc_clear_open_replay_data(struct obd_client_handle *och); -int mdc_close(struct obd_export *, struct mdc_op_data *, struct obd_client_handle *, +int mdc_close(struct obd_export *, struct md_op_data *, struct obd_client_handle *, struct ptlrpc_request **); int mdc_readpage(struct obd_export *exp, struct lu_fid *mdc_fid, __u64 offset, struct page *, struct ptlrpc_request **); -int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data, +int mdc_create(struct obd_export *exp, struct md_op_data *op_data, const void *data, int datalen, int mode, __u32 uid, __u32 gid, __u32 cap_effective, __u64 rdev,struct ptlrpc_request **request); -int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, +int mdc_unlink(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **request); -int mdc_link(struct obd_export *exp, struct mdc_op_data *data, +int mdc_link(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **); -int mdc_rename(struct obd_export *exp, struct mdc_op_data *data, +int mdc_rename(struct obd_export *exp, struct md_op_data *op_data, const char *old, int oldlen, const char *new, int newlen, struct ptlrpc_request **request); int mdc_sync(struct obd_export *exp, struct lu_fid *fid, @@ -133,6 +133,6 @@ int mdc_sync(struct obd_export *exp, struct lu_fid *fid, int mdc_create_client(struct obd_uuid uuid, struct ptlrpc_client *cl); int mdc_llog_process(struct obd_export *, char *logname, llog_cb_t, void *data); -int mdc_done_writing(struct obd_export *exp, struct mdc_op_data *data); +int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data); #endif diff --git a/lustre/liblustre/dir.c b/lustre/liblustre/dir.c index 6938493..873f1f1 100644 --- a/lustre/liblustre/dir.c +++ b/lustre/liblustre/dir.c @@ -73,7 +73,7 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page) struct lustre_handle lockh; struct mdt_body *body; struct lookup_intent it = { .it_op = IT_READDIR }; - struct mdc_op_data data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct obd_device *obddev = class_exp2obd(sbi->ll_mdc_exp); struct ldlm_res_id res_id = { .name = {fid_seq(&lli->lli_fid), fid_num(&lli->lli_fid)} }; @@ -83,10 +83,10 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page) rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED, &res_id, LDLM_IBITS, &policy, LCK_CR, &lockh); if (!rc) { - llu_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0); + llu_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0); rc = mdc_enqueue(sbi->ll_mdc_exp, LDLM_IBITS, &it, LCK_CR, - &data, &lockh, NULL, 0, + &op_data, &lockh, NULL, 0, ldlm_completion_ast, llu_mdc_blocking_ast, inode, LDLM_FL_CANCEL_ON_BLOCK); request = (struct ptlrpc_request *)it.d.lustre.it_data; diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index 9977bd5..e34a02a 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -71,7 +71,7 @@ void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2) } } -void llu_prepare_mdc_op_data(struct mdc_op_data *data, +void llu_prepare_mdc_op_data(struct md_op_data *op_data, struct inode *i1, struct inode *i2, const char *name, @@ -80,16 +80,16 @@ void llu_prepare_mdc_op_data(struct mdc_op_data *data, { LASSERT(i1); - ll_i2gids(data->suppgids, i1, i2); - data->fid1 = *ll_inode2fid(i1); + ll_i2gids(op_data->suppgids, i1, i2); + op_data->fid1 = *ll_inode2fid(i1); if (i2) - data->fid2 = *ll_inode2fid(i2); + op_data->fid2 = *ll_inode2fid(i2); - data->name = name; - data->namelen = namelen; - data->create_mode = mode; - data->mod_time = CURRENT_TIME; + op_data->name = name; + op_data->namelen = namelen; + op_data->create_mode = mode; + op_data->mod_time = CURRENT_TIME; } void obdo_refresh_inode(struct inode *dst, @@ -302,7 +302,7 @@ int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode) struct ptlrpc_request *req = NULL; struct obd_client_handle *och = &fd->fd_mds_och; struct intnl_stat *st = llu_i2stat(inode); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int rc; ENTRY; diff --git a/lustre/liblustre/llite_lib.h b/lustre/liblustre/llite_lib.h index fdf86e4..83a6408 100644 --- a/lustre/liblustre/llite_lib.h +++ b/lustre/liblustre/llite_lib.h @@ -195,7 +195,7 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr); extern struct fssw_ops llu_fssw_ops; /* file.c */ -void llu_prepare_mdc_op_data(struct mdc_op_data *data, +void llu_prepare_mdc_op_data(struct md_op_data *op_data, struct inode *i1, struct inode *i2, const char *name, diff --git a/lustre/liblustre/namei.c b/lustre/liblustre/namei.c index 8285107..a2a784e 100644 --- a/lustre/liblustre/namei.c +++ b/lustre/liblustre/namei.c @@ -222,7 +222,7 @@ static int llu_pb_revalidate(struct pnode *pnode, int flags, { struct pnode_base *pb = pnode->p_base; struct it_cb_data icbd; - struct mdc_op_data op_data; + struct md_op_data op_data; struct ptlrpc_request *req = NULL; struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; struct obd_export *exp; @@ -417,7 +417,7 @@ struct inode *llu_inode_from_lock(struct ldlm_lock *lock) static int llu_lookup_it(struct inode *parent, struct pnode *pnode, struct lookup_intent *it, int flags) { - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct it_cb_data icbd; struct ptlrpc_request *req = NULL; struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index 129fff6..e2b39b9 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -622,7 +622,7 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr) struct llu_sb_info *sbi = llu_i2sbi(inode); struct intnl_stat *st = llu_i2stat(inode); struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int ia_valid = attr->ia_valid; int rc = 0; ENTRY; @@ -847,7 +847,7 @@ static int llu_iop_symlink_raw(struct pnode *pno, const char *tgt) int len = qstr->len; struct ptlrpc_request *request = NULL; struct llu_sb_info *sbi = llu_i2sbi(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err = -EMLINK; ENTRY; @@ -964,7 +964,7 @@ static int llu_iop_mknod_raw(struct pnode *pno, struct ptlrpc_request *request = NULL; struct inode *dir = pno->p_parent->p_base->pb_ino; struct llu_sb_info *sbi = llu_i2sbi(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err = -EMLINK; ENTRY; @@ -1017,7 +1017,7 @@ static int llu_iop_link_raw(struct pnode *old, struct pnode *new) const char *name = new->p_base->pb_name.name; int namelen = new->p_base->pb_name.len; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int rc; ENTRY; @@ -1044,7 +1044,7 @@ static int llu_iop_unlink_raw(struct pnode *pno) int len = qstr->len; struct inode *target = pno->p_base->pb_ino; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int rc; ENTRY; @@ -1070,7 +1070,7 @@ static int llu_iop_rename_raw(struct pnode *old, struct pnode *new) const char *newname = new->p_base->pb_name.name; int newnamelen = new->p_base->pb_name.len; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int rc; ENTRY; @@ -1213,7 +1213,7 @@ static int llu_iop_mkdir_raw(struct pnode *pno, mode_t mode) int len = qstr->len; struct ptlrpc_request *request = NULL; struct intnl_stat *st = llu_i2stat(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err = -EMLINK; ENTRY; @@ -1246,7 +1246,7 @@ static int llu_iop_rmdir_raw(struct pnode *pno) const char *name = qstr->name; int len = qstr->len; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int rc; ENTRY; diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 6314da4..e2bd7eb 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -231,7 +231,7 @@ static int revalidate_it_finish(struct ptlrpc_request *request, int offset, RETURN(-ENOENT); sbi = ll_i2sbi(de->d_inode); - rc = ll_prep_inode(sbi->ll_osc_exp, &de->d_inode, request, offset, NULL); + rc = ll_prep_inode(sbi->ll_dt_exp, &de->d_inode, request, offset, NULL); RETURN(rc); } @@ -282,7 +282,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, { int rc; struct it_cb_data icbd; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct ptlrpc_request *req = NULL; struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; struct obd_export *exp; @@ -296,7 +296,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, if (de->d_inode == NULL) RETURN(0); - exp = ll_i2mdcexp(de->d_inode); + exp = ll_i2mdexp(de->d_inode); icbd.icbd_parent = de->d_parent->d_inode; icbd.icbd_childp = &de; @@ -311,8 +311,8 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, parent = de->d_parent->d_inode; - ll_prepare_mdc_op_data(&op_data, parent, NULL, de->d_name.name, - de->d_name.len, 0); + ll_prepare_md_op_data(&op_data, parent, NULL, de->d_name.name, + de->d_name.len, 0); rc = mdc_intent_lock(exp, &op_data, NULL, 0, it, lookup_flags, &req, ll_mdc_blocking_ast, 0); @@ -398,7 +398,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, unlock_kernel(); handle = (flag) ? &ldd->lld_mnt_och : &ldd->lld_cwd_och; - rc = obd_pin(sbi->ll_mdc_exp, &ll_i2info(inode)->lli_fid, + rc = obd_pin(sbi->ll_md_exp, &ll_i2info(inode)->lli_fid, handle, flag); if (rc) { @@ -448,7 +448,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, return; } - rc = obd_unpin(sbi->ll_mdc_exp, &handle, flag); + rc = obd_unpin(sbi->ll_md_exp, &handle, flag); EXIT; return; } diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 0ebf7e2..9366700 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -69,7 +69,7 @@ static int ll_dir_readpage(struct file *file, struct page *page) CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) off "LPU64"\n", inode->i_ino, inode->i_generation, inode, offset); - rc = mdc_readpage(ll_i2sbi(inode)->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_readpage(ll_i2sbi(inode)->ll_md_exp, ll_inode2fid(inode), offset, page, &request); if (!rc) { body = lustre_msg_buf(request->rq_repmsg, 0, sizeof (*body)); @@ -163,7 +163,7 @@ out: Ebadsize: CERROR("%s: directory %lu/%u size %llu is not a multiple of %u\n", - ll_i2mdcexp(dir)->exp_obd->obd_name, dir->i_ino, + ll_i2mdexp(dir)->exp_obd->obd_name, dir->i_ino, dir->i_generation, dir->i_size, chunk_size); goto fail; Eshort: @@ -183,7 +183,7 @@ Espan: bad_entry: CERROR("%s: bad entry in directory %lu/%u: %s - " "offset=%lu+%u, inode=%lu, rec_len=%d, name_len=%d", - ll_i2mdcexp(dir)->exp_obd->obd_name, dir->i_ino, + ll_i2mdexp(dir)->exp_obd->obd_name, dir->i_ino, dir->i_generation, error, (page->index<inode), rec_len, p->name_len); @@ -205,7 +205,7 @@ static struct page *ll_get_dir_page(struct inode *dir, unsigned long n) struct ldlm_res_id res_id = { .name = { fid_seq(ll_inode2fid(dir)), fid_num(ll_inode2fid(dir)) } }; struct lustre_handle lockh; - struct obd_device *obddev = class_exp2obd(ll_i2sbi(dir)->ll_mdc_exp); + struct obd_device *obddev = class_exp2obd(ll_i2sbi(dir)->ll_md_exp); struct address_space *mapping = dir->i_mapping; struct page *page; ldlm_policy_data_t policy = {.l_inodebits = {MDS_INODELOCK_UPDATE} }; @@ -216,12 +216,12 @@ static struct page *ll_get_dir_page(struct inode *dir, unsigned long n) if (!rc) { struct lookup_intent it = { .it_op = IT_READDIR }; struct ptlrpc_request *request; - struct mdc_op_data data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; - ll_prepare_mdc_op_data(&data, dir, NULL, NULL, 0, 0); + ll_prepare_md_op_data(&op_data, dir, NULL, NULL, 0, 0); - rc = mdc_enqueue(ll_i2sbi(dir)->ll_mdc_exp, LDLM_IBITS, &it, - LCK_CR, &data, &lockh, NULL, 0, + rc = mdc_enqueue(ll_i2sbi(dir)->ll_md_exp, LDLM_IBITS, &it, + LCK_CR, &op_data, &lockh, NULL, 0, ldlm_completion_ast, ll_mdc_blocking_ast, dir, 0); @@ -423,7 +423,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, GOTO(out, rc = -EINVAL); } - rc = mdc_getattr_name(sbi->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_getattr_name(sbi->ll_md_exp, ll_inode2fid(inode), filename, namelen, OBD_MD_FLID, 0, &request); if (rc < 0) { @@ -440,13 +440,13 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, } case LL_IOC_LOV_SETSTRIPE: { struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct iattr attr = { 0 }; struct lov_user_md lum, *lump = (struct lov_user_md *)arg; int rc = 0; - ll_prepare_mdc_op_data(&op_data, inode, - NULL, NULL, 0, 0); + ll_prepare_md_op_data(&op_data, inode, + NULL, NULL, 0, 0); LASSERT(sizeof(lum) == sizeof(*lump)); LASSERT(sizeof(lum.lmm_objects[0]) == @@ -467,7 +467,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, lustre_swab_lov_user_md(&lum); /* swabbing is done in lov_setstripe() on server side */ - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, + rc = mdc_setattr(sbi->ll_md_exp, &op_data, &attr, &lum, sizeof(lum), NULL, 0, &request); if (rc) { ptlrpc_req_finished(request); @@ -490,7 +490,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, if (rc) RETURN(rc); - rc = mdc_getattr(sbi->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_getattr(sbi->ll_md_exp, ll_inode2fid(inode), OBD_MD_FLDIREA, lmmsize, &request); if (rc < 0) { CDEBUG(D_INFO, "mdc_getattr failed: rc = %d\n", rc); @@ -547,7 +547,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, if (rc) RETURN(rc); - rc = mdc_getattr_name(sbi->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_getattr_name(sbi->ll_md_exp, ll_inode2fid(inode), filename, strlen(filename) + 1, OBD_MD_FLEASIZE, lmmsize, &request); if (rc < 0) { @@ -588,10 +588,10 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, struct lov_user_md_join *lmj; int lmj_size, i, aindex = 0, rc; - rc = obd_unpackmd(sbi->ll_osc_exp, &lsm, lmm, lmmsize); + rc = obd_unpackmd(sbi->ll_dt_exp, &lsm, lmm, lmmsize); if (rc < 0) GOTO(out_req, rc = -ENOMEM); - rc = obd_checkmd(sbi->ll_osc_exp, sbi->ll_mdc_exp, lsm); + rc = obd_checkmd(sbi->ll_dt_exp, sbi->ll_md_exp, lsm); if (rc) GOTO(out_free_memmd, rc); @@ -635,7 +635,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, lmm = (struct lov_mds_md *)lmj; lmmsize = lmj_size; out_free_memmd: - obd_free_memmd(sbi->ll_osc_exp, &lsm); + obd_free_memmd(sbi->ll_dt_exp, &lsm); if (rc) GOTO(out_req, rc); } @@ -734,13 +734,13 @@ out_free_memmd: if (!oqctl) RETURN(-ENOMEM); oqctl->qc_type = arg; - rc = obd_quotacheck(sbi->ll_mdc_exp, oqctl); + rc = obd_quotacheck(sbi->ll_md_exp, oqctl); if (rc < 0) { CDEBUG(D_INFO, "mdc_quotacheck failed: rc %d\n", rc); error = rc; } - rc = obd_quotacheck(sbi->ll_osc_exp, oqctl); + rc = obd_quotacheck(sbi->ll_dt_exp, oqctl); if (rc < 0) CDEBUG(D_INFO, "osc_quotacheck failed: rc %d\n", rc); @@ -758,7 +758,7 @@ out_free_memmd: if (!check) RETURN(-ENOMEM); - rc = obd_iocontrol(cmd, sbi->ll_mdc_exp, 0, (void *)check, + rc = obd_iocontrol(cmd, sbi->ll_md_exp, 0, (void *)check, NULL); if (rc) { CDEBUG(D_QUOTA, "mdc ioctl %d failed: %d\n", cmd, rc); @@ -767,7 +767,7 @@ out_free_memmd: GOTO(out_poll, rc); } - rc = obd_iocontrol(cmd, sbi->ll_osc_exp, 0, (void *)check, + rc = obd_iocontrol(cmd, sbi->ll_dt_exp, 0, (void *)check, NULL); if (rc) { CDEBUG(D_QUOTA, "osc ioctl %d failed: %d\n", cmd, rc); @@ -818,7 +818,7 @@ out_free_memmd: /* XXX: dqb_valid is borrowed as a flag to mark that * only mds quota is wanted */ if (qctl->qc_dqblk.dqb_valid) - qctl->obd_uuid = sbi->ll_mdc_exp->exp_obd-> + qctl->obd_uuid = sbi->ll_md_exp->exp_obd-> u.cli.cl_target_uuid; break; case Q_GETINFO: @@ -835,7 +835,7 @@ out_free_memmd: struct obd_uuid *uuid = &qctl->obd_uuid; obd = class_find_client_notype(uuid, - &sbi->ll_osc_exp->exp_obd->obd_uuid); + &sbi->ll_dt_exp->exp_obd->obd_uuid); if (!obd) GOTO(out_quotactl, rc = -ENOENT); @@ -846,12 +846,12 @@ out_free_memmd: else GOTO(out_quotactl, rc = -EINVAL); - if (sbi->ll_mdc_exp->exp_obd == obd) { - rc = obd_quotactl(sbi->ll_mdc_exp, oqctl); + if (sbi->ll_md_exp->exp_obd == obd) { + rc = obd_quotactl(sbi->ll_md_exp, oqctl); } else { int i; struct obd_export *exp; - struct lov_obd *lov = &sbi->ll_osc_exp-> + struct lov_obd *lov = &sbi->ll_dt_exp-> exp_obd->u.lov; for (i = 0; i < lov->desc.ld_tgt_count; i++) { @@ -876,10 +876,10 @@ out_free_memmd: GOTO(out_quotactl, rc); } - rc = obd_quotactl(sbi->ll_mdc_exp, oqctl); + rc = obd_quotactl(sbi->ll_md_exp, oqctl); if (rc && rc != -EBUSY && cmd == Q_QUOTAON) { oqctl->qc_cmd = Q_QUOTAOFF; - obd_quotactl(sbi->ll_mdc_exp, oqctl); + obd_quotactl(sbi->ll_md_exp, oqctl); } QCTL_COPY(qctl, oqctl); @@ -893,7 +893,7 @@ out_free_memmd: } #endif /* HAVE_QUOTA_SUPPORT */ case OBD_IOC_GETNAME: { - struct obd_device *obd = class_exp2obd(sbi->ll_osc_exp); + struct obd_device *obd = class_exp2obd(sbi->ll_dt_exp); if (!obd) RETURN(-EFAULT); if (copy_to_user((void *)arg, obd->obd_name, @@ -902,7 +902,7 @@ out_free_memmd: RETURN(0); } default: - RETURN(obd_iocontrol(cmd, sbi->ll_osc_exp,0,NULL,(void *)arg)); + RETURN(obd_iocontrol(cmd, sbi->ll_dt_exp,0,NULL,(void *)arg)); } } diff --git a/lustre/llite/file.c b/lustre/llite/file.c index acf7c91..e79761e 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -53,7 +53,7 @@ int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode, struct ll_file_data *fd = LUSTRE_FPRIVATE(file); struct ptlrpc_request *req = NULL; struct obd_client_handle *och = &fd->fd_mds_och; - struct mdc_op_data op_data; + struct md_op_data op_data; int rc; ENTRY; @@ -141,7 +141,7 @@ int ll_file_release(struct inode *inode, struct file *file) lov_test_and_clear_async_rc(lsm); lli->lli_async_rc = 0; - rc = ll_mdc_close(sbi->ll_mdc_exp, inode, file); + rc = ll_mdc_close(sbi->ll_md_exp, inode, file); RETURN(rc); } @@ -150,7 +150,7 @@ static int ll_intent_file_open(struct file *file, void *lmm, { struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode); struct lustre_handle lockh; - struct mdc_op_data data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct dentry *parent = file->f_dentry->d_parent; const char *name = file->f_dentry->d_name.name; const int len = file->f_dentry->d_name.len; @@ -159,9 +159,10 @@ static int ll_intent_file_open(struct file *file, void *lmm, if (!parent) RETURN(-ENOENT); - ll_prepare_mdc_op_data(&data, parent->d_inode, NULL, name, len, O_RDWR); + ll_prepare_md_op_data(&op_data, parent->d_inode, NULL, + name, len, O_RDWR); - rc = mdc_enqueue(sbi->ll_mdc_exp, LDLM_IBITS, itp, LCK_PW, &data, + rc = mdc_enqueue(sbi->ll_md_exp, LDLM_IBITS, itp, LCK_PW, &op_data, &lockh, lmm, lmmsize, ldlm_completion_ast, ll_mdc_blocking_ast, NULL, 0); if (rc < 0) @@ -331,7 +332,7 @@ static int ll_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock) { struct ll_inode_info *lli = ll_i2info(inode); struct lov_stripe_md *lsm = lli->lli_smd; - struct obd_export *exp = ll_i2obdexp(inode); + struct obd_export *exp = ll_i2dtexp(inode); struct { char name[16]; struct ldlm_lock *lock; @@ -703,7 +704,7 @@ int ll_glimpse_size(struct inode *inode, int ast_flags) * holding a DLM lock against this file, and resulting size * will be returned for each stripe. DLM lock on [0, EOF] is * acquired only if there were no conflicting locks. */ - rc = obd_enqueue(sbi->ll_osc_exp, lli->lli_smd, LDLM_EXTENT, &policy, + rc = obd_enqueue(sbi->ll_dt_exp, lli->lli_smd, LDLM_EXTENT, &policy, LCK_PR, &ast_flags, ll_extent_lock_callback, ldlm_completion_ast, ll_glimpse_callback, inode, sizeof(struct ost_lvb), lustre_swab_ost_lvb, &lockh); @@ -716,7 +717,7 @@ int ll_glimpse_size(struct inode *inode, int ast_flags) ll_inode_size_lock(inode, 1); inode_init_lvb(inode, &lvb); - obd_merge_lvb(sbi->ll_osc_exp, lli->lli_smd, &lvb, 0); + obd_merge_lvb(sbi->ll_dt_exp, lli->lli_smd, &lvb, 0); inode->i_size = lvb.lvb_size; inode->i_blocks = lvb.lvb_blocks; LTIME_S(inode->i_mtime) = lvb.lvb_mtime; @@ -727,7 +728,7 @@ int ll_glimpse_size(struct inode *inode, int ast_flags) CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %lu\n", inode->i_size, inode->i_blocks); - obd_cancel(sbi->ll_osc_exp, lli->lli_smd, LCK_PR, &lockh); + obd_cancel(sbi->ll_dt_exp, lli->lli_smd, LCK_PR, &lockh); RETURN(rc); } @@ -757,7 +758,7 @@ int ll_extent_lock(struct ll_file_data *fd, struct inode *inode, CDEBUG(D_DLMTRACE, "Locking inode %lu, start "LPU64" end "LPU64"\n", inode->i_ino, policy->l_extent.start, policy->l_extent.end); - rc = obd_enqueue(sbi->ll_osc_exp, lsm, LDLM_EXTENT, policy, mode, + rc = obd_enqueue(sbi->ll_dt_exp, lsm, LDLM_EXTENT, policy, mode, &ast_flags, ll_extent_lock_callback, ldlm_completion_ast, ll_glimpse_callback, inode, sizeof(struct ost_lvb), lustre_swab_ost_lvb, lockh); @@ -766,7 +767,7 @@ int ll_extent_lock(struct ll_file_data *fd, struct inode *inode, ll_inode_size_lock(inode, 1); inode_init_lvb(inode, &lvb); - obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 0); + obd_merge_lvb(sbi->ll_dt_exp, lsm, &lvb, 0); if (policy->l_extent.start == 0 && policy->l_extent.end == OBD_OBJECT_EOF) { @@ -806,7 +807,7 @@ int ll_extent_unlock(struct ll_file_data *fd, struct inode *inode, (sbi->ll_flags & LL_SBI_NOLCK)) RETURN(0); - rc = obd_cancel(sbi->ll_osc_exp, lsm, mode, lockh); + rc = obd_cancel(sbi->ll_dt_exp, lsm, mode, lockh); RETURN(rc); } @@ -890,7 +891,7 @@ static ssize_t ll_file_read(struct file *file, char *buf, size_t count, * correctly in the face of concurrent writes and truncates. */ inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2sbi(inode)->ll_osc_exp, lsm, &lvb, 1); + obd_merge_lvb(ll_i2sbi(inode)->ll_dt_exp, lsm, &lvb, 1); kms = lvb.lvb_size; if (*ppos + count - 1 > kms) { /* A glimpse is necessary to determine whether we return a @@ -1056,7 +1057,7 @@ static ssize_t ll_file_sendfile(struct file *in_file, loff_t *ppos,size_t count, * correctly in the face of concurrent writes and truncates. */ inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2sbi(inode)->ll_osc_exp, lsm, &lvb, 1); + obd_merge_lvb(ll_i2sbi(inode)->ll_dt_exp, lsm, &lvb, 1); kms = lvb.lvb_size; if (*ppos + count - 1 > kms) { /* A glimpse is necessary to determine whether we return a @@ -1095,7 +1096,7 @@ static int ll_lov_recreate_obj(struct inode *inode, struct file *file, unsigned long arg) { struct ll_inode_info *lli = ll_i2info(inode); - struct obd_export *exp = ll_i2obdexp(inode); + struct obd_export *exp = ll_i2dtexp(inode); struct ll_recreate_obj ucreatp; struct obd_trans_info oti = { 0 }; struct obdo *oa = NULL; @@ -1152,7 +1153,7 @@ static int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file, { struct ll_inode_info *lli = ll_i2info(inode); struct file *f = NULL; - struct obd_export *exp = ll_i2obdexp(inode); + struct obd_export *exp = ll_i2dtexp(inode); struct lov_stripe_md *lsm; struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags}; struct ptlrpc_request *req = NULL; @@ -1262,7 +1263,7 @@ static int ll_lov_setstripe(struct inode *inode, struct file *file, rc = ll_lov_setstripe_ea_info(inode, file, flags, &lum, sizeof(lum)); if (rc == 0) { put_user(0, &lump->lmm_stripe_count); - rc = obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2obdexp(inode), + rc = obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2dtexp(inode), 0, ll_i2info(inode)->lli_smd, lump); } RETURN(rc); @@ -1275,7 +1276,7 @@ static int ll_lov_getstripe(struct inode *inode, unsigned long arg) if (!lsm) RETURN(-ENODATA); - return obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2obdexp(inode), 0, lsm, + return obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2dtexp(inode), 0, lsm, (void *)arg); } @@ -1373,7 +1374,7 @@ static int join_file(struct inode *head_inode, struct file *head_filp, struct ptlrpc_request *req = NULL; struct ll_file_data *fd; struct lustre_handle lockh; - struct mdc_op_data *op_data; + struct md_op_data *op_data; __u32 hsize = head_inode->i_size >> 32; __u32 tsize = head_inode->i_size; struct file *f; @@ -1401,11 +1402,11 @@ static int join_file(struct inode *head_inode, struct file *head_filp, f->f_dentry = dget(head_filp->f_dentry); f->f_vfsmnt = mntget(head_filp->f_vfsmnt); - ll_prepare_mdc_op_data(op_data, head_inode, tail_parent, - tail_dentry->d_name.name, - tail_dentry->d_name.len, 0); + ll_prepare_md_op_data(op_data, head_inode, tail_parent, + tail_dentry->d_name.name, + tail_dentry->d_name.len, 0); - rc = mdc_enqueue(ll_i2mdcexp(head_inode), LDLM_IBITS, &oit, LCK_PW, + rc = mdc_enqueue(ll_i2mdexp(head_inode), LDLM_IBITS, &oit, LCK_PW, op_data, &lockh, &tsize, 0, ldlm_completion_ast, ll_mdc_blocking_ast, &hsize, 0); @@ -1504,18 +1505,18 @@ cleanup: switch (cleanup_phase) { case 3: ll_tree_unlock(&second_tree); - obd_cancel_unused(ll_i2obdexp(second), + obd_cancel_unused(ll_i2dtexp(second), ll_i2info(second)->lli_smd, 0, NULL); case 2: ll_tree_unlock(&first_tree); - obd_cancel_unused(ll_i2obdexp(first), + obd_cancel_unused(ll_i2dtexp(first), ll_i2info(first)->lli_smd, 0, NULL); case 1: filp_close(tail_filp, 0); if (tail) iput(tail); if (head && rc == 0) { - obd_free_memmd(ll_i2sbi(head)->ll_osc_exp, + obd_free_memmd(ll_i2sbi(head)->ll_dt_exp, &hlli->lli_smd); hlli->lli_smd = NULL; } @@ -1608,7 +1609,7 @@ int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd, case EXT3_IOC_SETVERSION: */ default: - RETURN(obd_iocontrol(cmd, ll_i2obdexp(inode), 0, NULL, + RETURN(obd_iocontrol(cmd, ll_i2dtexp(inode), 0, NULL, (void *)arg)); } } @@ -1690,7 +1691,7 @@ int ll_fsync(struct file *file, struct dentry *dentry, int data) rc = err; } - err = mdc_sync(ll_i2sbi(inode)->ll_mdc_exp, + err = mdc_sync(ll_i2sbi(inode)->ll_md_exp, ll_inode2fid(inode), &req); if (!rc) rc = err; @@ -1708,7 +1709,7 @@ int ll_fsync(struct file *file, struct dentry *dentry, int data) obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME); - err = obd_sync(ll_i2sbi(inode)->ll_osc_exp, oa, lsm, + err = obd_sync(ll_i2sbi(inode)->ll_dt_exp, oa, lsm, 0, OBD_OBJECT_EOF); if (!rc) rc = err; @@ -1795,8 +1796,8 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid, flags, mode, flock.l_flock.start, flock.l_flock.end); - obddev = sbi->ll_mdc_exp->exp_obd; - rc = ldlm_cli_enqueue(sbi->ll_mdc_exp, NULL, obddev->obd_namespace, + obddev = sbi->ll_md_exp->exp_obd; + rc = ldlm_cli_enqueue(sbi->ll_md_exp, NULL, obddev->obd_namespace, res_id, LDLM_FLOCK, &flock, mode, &flags, NULL, ldlm_flock_completion_ast, NULL, file_lock, NULL, 0, NULL, &lockh); @@ -1816,7 +1817,7 @@ static int ll_have_md_lock(struct dentry *de) if (!de->d_inode) RETURN(0); - obddev = sbi->ll_mdc_exp->exp_obd; + obddev = sbi->ll_md_exp->exp_obd; res_id.name[0] = fid_seq(ll_inode2fid(de->d_inode)); res_id.name[1] = fid_num(ll_inode2fid(de->d_inode)); @@ -1862,13 +1863,13 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it) RETURN(rc); valid |= OBD_MD_FLEASIZE | OBD_MD_FLMODEASIZE; } - rc = mdc_getattr(sbi->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_getattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, ealen, &req); if (rc) { CERROR("failure %d inode %lu\n", rc, inode->i_ino); RETURN(-abs(rc)); } - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, 0, NULL); + rc = ll_prep_inode(sbi->ll_dt_exp, &inode, req, 0, NULL); if (rc) { ptlrpc_req_finished(req); RETURN(rc); diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index 4a4c1e3..500ec88 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -122,7 +122,7 @@ static void ll_close_done_writing(struct inode *inode) struct ll_inode_info *lli = ll_i2info(inode); ldlm_policy_data_t policy = { .l_extent = {0, OBD_OBJECT_EOF } }; struct lustre_handle lockh = { 0 }; - struct mdc_op_data op_data; + struct md_op_data op_data; struct obdo obdo; obd_flag valid; int rc, ast_flags = 0; @@ -141,7 +141,7 @@ static void ll_close_done_writing(struct inode *inode) GOTO(out, rc); } - rc = ll_lsm_getattr(ll_i2obdexp(inode), lli->lli_smd, &obdo); + rc = ll_lsm_getattr(ll_i2dtexp(inode), lli->lli_smd, &obdo); if (rc) { CERROR("inode_getattr failed (%d): unable to send DONE_WRITING " "for inode %lu/%u\n", rc, inode->i_ino, @@ -168,7 +168,7 @@ static void ll_close_done_writing(struct inode *inode) op_data.blocks = inode->i_blocks; op_data.valid = OBD_MD_FLID | OBD_MD_FLSIZE | OBD_MD_FLBLOCKS; - rc = mdc_done_writing(ll_i2sbi(inode)->ll_mdc_exp, &op_data); + rc = mdc_done_writing(ll_i2sbi(inode)->ll_md_exp, &op_data); out: } #endif diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index c006cff..c102d7c 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -156,8 +156,8 @@ struct ll_sb_info { * grab from interrupt contexts */ spinlock_t ll_lock; struct obd_uuid ll_sb_uuid; - struct obd_export *ll_mdc_exp; - struct obd_export *ll_osc_exp; + struct obd_export *ll_md_exp; + struct obd_export *ll_dt_exp; struct proc_dir_entry* ll_proc_root; struct lu_fid ll_root_fid; /* root object fid */ @@ -347,9 +347,9 @@ int ll_mdc_cancel_unused(struct lustre_handle *, struct inode *, int flags, void *opaque); int ll_mdc_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *, void *data, int flag); -void ll_prepare_mdc_op_data(struct mdc_op_data *op_data, struct inode *i1, - struct inode *i2, const char *name, int namelen, - int mode); +void ll_prepare_md_op_data(struct md_op_data *op_data, struct inode *i1, + struct inode *i2, const char *name, int namelen, + int mode); /* llite/rw.c */ int ll_prepare_write(struct file *, struct page *, unsigned from, unsigned to); @@ -513,20 +513,20 @@ static inline __u64 ll_ts2u64(time_t *time) #endif /* don't need an addref as the sb_info should be holding one */ -static inline struct obd_export *ll_s2obdexp(struct super_block *sb) +static inline struct obd_export *ll_s2dtexp(struct super_block *sb) { - return ll_s2sbi(sb)->ll_osc_exp; + return ll_s2sbi(sb)->ll_dt_exp; } /* don't need an addref as the sb_info should be holding one */ -static inline struct obd_export *ll_s2mdcexp(struct super_block *sb) +static inline struct obd_export *ll_s2mdexp(struct super_block *sb) { - return ll_s2sbi(sb)->ll_mdc_exp; + return ll_s2sbi(sb)->ll_md_exp; } static inline struct client_obd *sbi2mdc(struct ll_sb_info *sbi) { - struct obd_device *obd = sbi->ll_mdc_exp->exp_obd; + struct obd_device *obd = sbi->ll_md_exp->exp_obd; if (obd == NULL) LBUG(); return &obd->u.cli; @@ -538,14 +538,14 @@ static inline struct ll_sb_info *ll_i2sbi(struct inode *inode) return ll_s2sbi(inode->i_sb); } -static inline struct obd_export *ll_i2obdexp(struct inode *inode) +static inline struct obd_export *ll_i2dtexp(struct inode *inode) { - return ll_s2obdexp(inode->i_sb); + return ll_s2dtexp(inode->i_sb); } -static inline struct obd_export *ll_i2mdcexp(struct inode *inode) +static inline struct obd_export *ll_i2mdexp(struct inode *inode) { - return ll_s2mdcexp(inode->i_sb); + return ll_s2mdexp(inode->i_sb); } static inline struct lu_fid *ll_inode2fid(struct inode *inode) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 2193454..e02c6e6 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -173,15 +173,15 @@ int client_common_fill_super(struct super_block *sb, char *mdc, char *osc) CERROR("cannot connect to %s: rc = %d\n", mdc, err); GOTO(out, err); } - sbi->ll_mdc_exp = class_conn2export(&mdc_conn); + sbi->ll_md_exp = class_conn2export(&mdc_conn); err = obd_statfs(obd, &osfs, jiffies - HZ); if (err) GOTO(out_mdc, err); /* MDC connect is surely finished by now */ - *data = class_exp2cliimp(sbi->ll_mdc_exp)->imp_connect_data; - *md_data = class_exp2cliimp(sbi->ll_mdc_exp)->imp_connect_data; + *data = class_exp2cliimp(sbi->ll_md_exp)->imp_connect_data; + *md_data = class_exp2cliimp(sbi->ll_md_exp)->imp_connect_data; LASSERT(osfs.os_bsize); sb->s_blocksize = osfs.os_bsize; @@ -245,15 +245,15 @@ int client_common_fill_super(struct super_block *sb, char *mdc, char *osc) GOTO(out_mdc, err); } - sbi->ll_osc_exp = class_conn2export(&osc_conn); + sbi->ll_dt_exp = class_conn2export(&osc_conn); spin_lock(&sbi->ll_lco.lco_lock); sbi->ll_lco.lco_flags = data->ocd_connect_flags; spin_unlock(&sbi->ll_lco.lco_lock); - mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp); + mdc_init_ea_size(sbi->ll_md_exp, sbi->ll_dt_exp); - err = obd_prep_async_page(sbi->ll_osc_exp, NULL, NULL, NULL, + err = obd_prep_async_page(sbi->ll_dt_exp, NULL, NULL, NULL, 0, NULL, NULL, NULL); if (err < 0) { LCONSOLE_ERROR("There are no OST's in this filesystem. " @@ -272,7 +272,7 @@ int client_common_fill_super(struct super_block *sb, char *mdc, char *osc) GOTO(out_osc, -ENOMEM); } - err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid); + err = mdc_getstatus(sbi->ll_md_exp, &rootfid); if (err) { CERROR("cannot mds_connect: rc = %d\n", err); GOTO(out_osc, err); @@ -292,7 +292,7 @@ int client_common_fill_super(struct super_block *sb, char *mdc, char *osc) /* make root inode * XXX: move this to after cbd setup? */ - err = mdc_getattr(sbi->ll_mdc_exp, &rootfid, + err = mdc_getattr(sbi->ll_md_exp, &rootfid, OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS | (sbi->ll_flags & LL_SBI_ACL ? OBD_MD_FLACL : 0), 0, &request); @@ -301,7 +301,7 @@ int client_common_fill_super(struct super_block *sb, char *mdc, char *osc) GOTO(out_osc, err); } - err = mdc_req2lustre_md(request, 0, sbi->ll_osc_exp, &md); + err = mdc_req2lustre_md(request, 0, sbi->ll_dt_exp, &md); if (err) { CERROR("failed to understand root inode md: rc = %d\n", err); ptlrpc_req_finished (request); @@ -313,7 +313,7 @@ int client_common_fill_super(struct super_block *sb, char *mdc, char *osc) ptlrpc_req_finished(request); if (root == NULL || is_bad_inode(root)) { - mdc_free_lustre_md(sbi->ll_osc_exp, &md); + mdc_free_lustre_md(sbi->ll_dt_exp, &md); CERROR("lustre_lite: bad iget4 for root\n"); GOTO(out_root, err = -EBADF); } @@ -345,9 +345,9 @@ out_root: if (root) iput(root); out_osc: - obd_disconnect(sbi->ll_osc_exp); + obd_disconnect(sbi->ll_dt_exp); out_mdc: - obd_disconnect(sbi->ll_mdc_exp); + obd_disconnect(sbi->ll_md_exp); out: if (data != NULL) OBD_FREE_PTR(data); @@ -361,9 +361,9 @@ int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize) { int size, rc; - *lmmsize = obd_size_diskmd(sbi->ll_osc_exp, NULL); + *lmmsize = obd_size_diskmd(sbi->ll_dt_exp, NULL); size = sizeof(int); - rc = obd_get_info(sbi->ll_mdc_exp, strlen("max_easize"), "max_easize", + rc = obd_get_info(sbi->ll_md_exp, strlen("max_easize"), "max_easize", &size, lmmsize); if (rc) CERROR("Get max mdsize error rc %d \n", rc); @@ -382,7 +382,7 @@ void ll_dump_inode(struct inode *inode) dentry_count++; CERROR("inode %p dump: dev=%s ino=%lu mode=%o count=%u, %d dentries\n", - inode, ll_i2mdcexp(inode)->exp_obd->obd_name, inode->i_ino, + inode, ll_i2mdexp(inode)->exp_obd->obd_name, inode->i_ino, inode->i_mode, atomic_read(&inode->i_count), dentry_count); } @@ -485,7 +485,7 @@ void client_common_put_super(struct super_block *sb) prune_deathrow(sbi, 0); list_del(&sbi->ll_conn_chain); - obd_disconnect(sbi->ll_osc_exp); + obd_disconnect(sbi->ll_dt_exp); lprocfs_unregister_mountpoint(sbi); if (sbi->ll_proc_root) { @@ -493,7 +493,7 @@ void client_common_put_super(struct super_block *sb) sbi->ll_proc_root = NULL; } - obd_disconnect(sbi->ll_mdc_exp); + obd_disconnect(sbi->ll_md_exp); lustre_throw_orphan_dentries(sb); EXIT; @@ -706,7 +706,7 @@ void ll_put_super(struct super_block *sb) cfg.cfg_instance = ll_instance; lustre_end_log(sb, NULL, &cfg); - obd = class_exp2obd(sbi->ll_mdc_exp); + obd = class_exp2obd(sbi->ll_md_exp); if (obd) { int next = 0; int force = obd->obd_no_recov; @@ -805,14 +805,14 @@ void ll_clear_inode(struct inode *inode) inode->i_generation, inode); clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(ll_i2info(inode)->lli_flags)); - mdc_change_cbdata(sbi->ll_mdc_exp, ll_inode2fid(inode), + mdc_change_cbdata(sbi->ll_md_exp, ll_inode2fid(inode), null_if_equal, inode); if (lli->lli_smd) { - obd_change_cbdata(sbi->ll_osc_exp, lli->lli_smd, + obd_change_cbdata(sbi->ll_dt_exp, lli->lli_smd, null_if_equal, inode); - obd_free_memmd(sbi->ll_osc_exp, &lli->lli_smd); + obd_free_memmd(sbi->ll_dt_exp, &lli->lli_smd); lli->lli_smd = NULL; } @@ -858,7 +858,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) struct lov_stripe_md *lsm = lli->lli_smd; struct ll_sb_info *sbi = ll_i2sbi(inode); struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int ia_valid = attr->ia_valid; int rc = 0; ENTRY; @@ -913,9 +913,9 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) * inode ourselves so we can call obdo_from_inode() always. */ if (ia_valid & (lsm ? ~(ATTR_SIZE | ATTR_FROM_OPEN | ATTR_RAW) : ~0)) { struct lustre_md md; - ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0); + ll_prepare_md_op_data(&op_data, inode, NULL, NULL, 0, 0); - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, + rc = mdc_setattr(sbi->ll_md_exp, &op_data, attr, NULL, 0, NULL, 0, &request); if (rc) { @@ -925,7 +925,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) RETURN(rc); } - rc = mdc_req2lustre_md(request, 0, sbi->ll_osc_exp, &md); + rc = mdc_req2lustre_md(request, 0, sbi->ll_dt_exp, &md); if (rc) { ptlrpc_req_finished(request); RETURN(rc); @@ -1031,7 +1031,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) OBD_MD_FLFID | OBD_MD_FLGENER; obdo_from_inode(&oa, inode, flags); - rc = obd_setattr(sbi->ll_osc_exp, &oa, lsm, NULL); + rc = obd_setattr(sbi->ll_dt_exp, &oa, lsm, NULL); if (rc) CERROR("obd_setattr fails: rc=%d\n", rc); } @@ -1052,7 +1052,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, int rc; ENTRY; - rc = obd_statfs(class_exp2obd(sbi->ll_mdc_exp), osfs, max_age); + rc = obd_statfs(class_exp2obd(sbi->ll_md_exp), osfs, max_age); if (rc) { CERROR("mdc_statfs fails: rc = %d\n", rc); RETURN(rc); @@ -1063,7 +1063,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files); - rc = obd_statfs(class_exp2obd(sbi->ll_osc_exp), &obd_osfs, max_age); + rc = obd_statfs(class_exp2obd(sbi->ll_dt_exp), &obd_osfs, max_age); if (rc) { CERROR("obd_statfs fails: rc = %d\n", rc); RETURN(rc); @@ -1165,7 +1165,7 @@ static void ll_replace_lsm(struct inode *inode, struct lov_stripe_md *lsm) dump_lsm(D_INODE, lli->lli_smd); LASSERTF(lsm->lsm_magic == LOV_MAGIC_JOIN, "lsm must be joined lsm %p\n", lsm); - obd_free_memmd(ll_i2obdexp(inode), &lli->lli_smd); + obd_free_memmd(ll_i2dtexp(inode), &lli->lli_smd); CDEBUG(D_INODE, "replace lsm %p to lli_smd %p for inode %lu%u(%p)\n", lsm, lli->lli_smd, inode->i_ino, inode->i_generation, inode); lli->lli_smd = lsm; @@ -1217,7 +1217,7 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) LASSERTF(lsm->lsm_xfersize != 0, "%lu\n", lsm->lsm_xfersize); inode->i_blksize = min(lsm->lsm_xfersize, LL_MAX_BLKSIZE); if (lli->lli_smd != lsm) - obd_free_memmd(ll_i2obdexp(inode), &lsm); + obd_free_memmd(ll_i2dtexp(inode), &lsm); } else { inode->i_blksize = max(inode->i_blksize, inode->i_sb->s_blocksize); @@ -1361,7 +1361,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, case EXT3_IOC_GETFLAGS: { struct mdt_body *body; - rc = mdc_getattr(sbi->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_getattr(sbi->ll_md_exp, ll_inode2fid(inode), OBD_MD_FLFLAGS, 0, &req); if (rc) { CERROR("failure %d inode %lu\n", rc, inode->i_ino); @@ -1382,7 +1382,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, RETURN(put_user(flags, (int *)arg)); } case EXT3_IOC_SETFLAGS: { - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct iattr attr; struct obdo *oa; struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd; @@ -1394,13 +1394,13 @@ int ll_iocontrol(struct inode *inode, struct file *file, if (!oa) RETURN(-ENOMEM); - ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0); + ll_prepare_md_op_data(&op_data, inode, NULL, NULL, 0, 0); memset(&attr, 0x0, sizeof(attr)); attr.ia_attr_flags = flags; attr.ia_valid |= ATTR_ATTR_FLAG; - rc = mdc_setattr(sbi->ll_mdc_exp, &op_data, + rc = mdc_setattr(sbi->ll_md_exp, &op_data, &attr, NULL, 0, NULL, 0, &req); if (rc || lsm == NULL) { ptlrpc_req_finished(req); @@ -1414,7 +1414,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS; obdo_from_inode(oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER); - rc = obd_setattr(sbi->ll_osc_exp, oa, lsm, NULL); + rc = obd_setattr(sbi->ll_dt_exp, oa, lsm, NULL); obdo_free(oa); if (rc) { if (rc != -EPERM && rc != -EACCES) @@ -1459,26 +1459,26 @@ void ll_umount_begin(struct super_block *sb) CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb, sb->s_count, atomic_read(&sb->s_active)); - obd = class_exp2obd(sbi->ll_mdc_exp); + obd = class_exp2obd(sbi->ll_md_exp); if (obd == NULL) { CERROR("Invalid MDC connection handle "LPX64"\n", - sbi->ll_mdc_exp->exp_handle.h_cookie); + sbi->ll_md_exp->exp_handle.h_cookie); EXIT; return; } obd->obd_no_recov = 1; - obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_mdc_exp, sizeof ioc_data, + obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_md_exp, sizeof ioc_data, &ioc_data, NULL); - obd = class_exp2obd(sbi->ll_osc_exp); + obd = class_exp2obd(sbi->ll_dt_exp); if (obd == NULL) { CERROR("Invalid LOV connection handle "LPX64"\n", - sbi->ll_osc_exp->exp_handle.h_cookie); + sbi->ll_dt_exp->exp_handle.h_cookie); EXIT; return; } obd->obd_no_recov = 1; - obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_osc_exp, sizeof ioc_data, + obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_dt_exp, sizeof ioc_data, &ioc_data, NULL); /* Really, we'd like to wait until there are no requests outstanding, @@ -1498,7 +1498,7 @@ int ll_remount_fs(struct super_block *sb, int *flags, char *data) if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { read_only = *flags & MS_RDONLY; - err = obd_set_info(sbi->ll_mdc_exp, strlen("read-only"), + err = obd_set_info(sbi->ll_md_exp, strlen("read-only"), "read-only", sizeof(read_only), &read_only); if (err) { CERROR("Failed to change the read-only flag during " @@ -1551,7 +1551,7 @@ int ll_prep_inode(struct obd_export *exp, struct inode **inode, ll_i2info(*inode)->lli_fid = md.body->fid1; } - rc = obd_checkmd(exp, ll_i2mdcexp(*inode), + rc = obd_checkmd(exp, ll_i2mdexp(*inode), ll_i2info(*inode)->lli_smd); out: RETURN(rc); @@ -1612,9 +1612,9 @@ int ll_obd_statfs(struct inode *inode, void *arg) if (type == LL_STATFS_MDC) { if (index > 0) GOTO(out_statfs, rc = -ENODEV); - client_obd = class_exp2obd(sbi->ll_mdc_exp); + client_obd = class_exp2obd(sbi->ll_md_exp); } else if (type == LL_STATFS_LOV) { - lov_obd = class_exp2obd(sbi->ll_osc_exp); + lov_obd = class_exp2obd(sbi->ll_dt_exp); lov = &lov_obd->u.lov; if (index >= lov->desc.ld_tgt_count) diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index 6f0100d..8254e98 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -399,7 +399,7 @@ struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, lov_stripe_lock(lsm); inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); + obd_merge_lvb(ll_i2dtexp(inode), lsm, &lvb, 1); kms = lvb.lvb_size; pgoff = ((address - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff; @@ -460,7 +460,7 @@ static void ll_vm_open(struct vm_area_struct * vma) int count; spin_unlock(&lli->lli_lock); - count = obd_join_lru(sbi->ll_osc_exp, lsm, 0); + count = obd_join_lru(sbi->ll_dt_exp, lsm, 0); VMA_DEBUG(vma, "split %d unused locks from lru\n", count); } else { spin_unlock(&lli->lli_lock); @@ -486,7 +486,7 @@ static void ll_vm_close(struct vm_area_struct *vma) int count; spin_unlock(&lli->lli_lock); - count = obd_join_lru(sbi->ll_osc_exp, lsm, 1); + count = obd_join_lru(sbi->ll_dt_exp, lsm, 1); VMA_DEBUG(vma, "join %d unused locks to lru\n", count); } else { spin_unlock(&lli->lli_lock); diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index 3c424df..cf12f5e 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -79,14 +79,14 @@ static struct inode *search_inode_for_lustre(struct super_block *sb, valid |= OBD_MD_FLEASIZE; } - rc = mdc_getattr(sbi->ll_mdc_exp, fid, valid, eadatalen, &req); + rc = mdc_getattr(sbi->ll_md_exp, fid, valid, eadatalen, &req); if (rc) { CERROR("can't get object attrs, fid "DFID3", rc %d\n", PFID3(fid), rc); return ERR_PTR(rc); } - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, 0, sb); + rc = ll_prep_inode(sbi->ll_dt_exp, &inode, req, 0, sb); if (rc) { ptlrpc_req_finished(req); return ERR_PTR(rc); diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index 8519ec3..4cbf3ed 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -280,7 +280,7 @@ static int ll_wr_checksum(struct file *file, const char *buffer, else sbi->ll_flags &= ~LL_SBI_CHECKSUM; - rc = obd_set_info(sbi->ll_osc_exp, strlen("checksum"), "checksum", + rc = obd_set_info(sbi->ll_dt_exp, strlen("checksum"), "checksum", sizeof(val), &val); if (rc) CWARN("Failed to set OSC checksum flags: %d\n", rc); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 6a124ec..dc691bb 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -207,7 +207,7 @@ void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2) } } -void ll_prepare_mdc_op_data(struct mdc_op_data *op_data, struct inode *i1, +void ll_prepare_md_op_data(struct md_op_data *op_data, struct inode *i1, struct inode *i2, const char *name, int namelen, int mode) { @@ -336,7 +336,7 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset, if (!it_disposition(it, DISP_LOOKUP_NEG)) { ENTRY; - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, request, offset, + rc = ll_prep_inode(sbi->ll_dt_exp, &inode, request, offset, (*de)->d_sb); if (rc) RETURN(rc); @@ -372,7 +372,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, struct lookup_intent *it, int lookup_flags) { struct dentry *save = dentry, *retval; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct it_cb_data icbd; struct ptlrpc_request *req = NULL; struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; @@ -403,12 +403,12 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, } } - ll_prepare_mdc_op_data(&op_data, parent, NULL, dentry->d_name.name, + ll_prepare_md_op_data(&op_data, parent, NULL, dentry->d_name.name, dentry->d_name.len, lookup_flags); it->it_create_mode &= ~current->fs->umask; - rc = mdc_intent_lock(ll_i2mdcexp(parent), &op_data, NULL, 0, it, + rc = mdc_intent_lock(ll_i2mdexp(parent), &op_data, NULL, 0, it, lookup_flags, &req, ll_mdc_blocking_ast, 0); if (rc < 0) @@ -463,7 +463,7 @@ static struct inode *ll_create_node(struct inode *dir, const char *name, LASSERT(it && it->d.lustre.it_disposition); request = it->d.lustre.it_data; - rc = ll_prep_inode(sbi->ll_osc_exp, &inode, request, 1, dir->i_sb); + rc = ll_prep_inode(sbi->ll_dt_exp, &inode, request, 1, dir->i_sb); if (rc) GOTO(out, inode = ERR_PTR(rc)); @@ -550,7 +550,7 @@ static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev) struct ptlrpc_request *request = NULL; struct inode *dir = nd->dentry->d_inode; struct ll_sb_info *sbi = ll_i2sbi(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err; ENTRY; @@ -568,10 +568,10 @@ static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev) case S_IFBLK: case S_IFIFO: case S_IFSOCK: - ll_prepare_mdc_op_data(&op_data, dir, NULL, + ll_prepare_md_op_data(&op_data, dir, NULL, nd->last.name, nd->last.len, 0); - err = mdc_create(sbi->ll_mdc_exp, &op_data, NULL, 0, mode, + err = mdc_create(sbi->ll_md_exp, &op_data, NULL, 0, mode, current->fsuid, current->fsgid, current->cap_effective, rdev, &request); if (err == 0) @@ -593,7 +593,7 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild, int mode, struct ptlrpc_request *request = NULL; struct inode *inode = NULL; struct ll_sb_info *sbi = ll_i2sbi(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err; ENTRY; @@ -618,10 +618,10 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild, int mode, LBUG(); } - ll_prepare_mdc_op_data(&op_data, dir, NULL, dchild->d_name.name, + ll_prepare_md_op_data(&op_data, dir, NULL, dchild->d_name.name, dchild->d_name.len, 0); - err = mdc_create(sbi->ll_mdc_exp, &op_data, NULL, 0, mode, + err = mdc_create(sbi->ll_md_exp, &op_data, NULL, 0, mode, current->fsuid, current->fsgid, current->cap_effective, rdev, &request); if (err) @@ -629,7 +629,7 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild, int mode, ll_update_times(request, 0, dir); - err = ll_prep_inode(sbi->ll_osc_exp, &inode, request, 0, + err = ll_prep_inode(sbi->ll_dt_exp, &inode, request, 0, dchild->d_sb); if (err) GOTO(out_err, err); @@ -652,7 +652,7 @@ static int ll_symlink_raw(struct nameidata *nd, const char *tgt) struct inode *dir = nd->dentry->d_inode; struct ptlrpc_request *request = NULL; struct ll_sb_info *sbi = ll_i2sbi(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err; ENTRY; @@ -667,10 +667,10 @@ static int ll_symlink_raw(struct nameidata *nd, const char *tgt) LBUG(); } - ll_prepare_mdc_op_data(&op_data, dir, NULL, + ll_prepare_md_op_data(&op_data, dir, NULL, nd->last.name, nd->last.len, 0); - err = mdc_create(sbi->ll_mdc_exp, &op_data, + err = mdc_create(sbi->ll_md_exp, &op_data, tgt, strlen(tgt) + 1, S_IFLNK | S_IRWXUGO, current->fsuid, current->fsgid, current->cap_effective, 0, &request); @@ -686,7 +686,7 @@ static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd) struct inode *src = srcnd->dentry->d_inode; struct inode *dir = tgtnd->dentry->d_inode; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err; struct ll_sb_info *sbi = ll_i2sbi(dir); @@ -696,10 +696,10 @@ static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd) src->i_ino, src->i_generation, src, dir->i_ino, dir->i_generation, dir, tgtnd->last.len, tgtnd->last.name); - ll_prepare_mdc_op_data(&op_data, src, dir, tgtnd->last.name, + ll_prepare_md_op_data(&op_data, src, dir, tgtnd->last.name, tgtnd->last.len, 0); - err = mdc_link(sbi->ll_mdc_exp, &op_data, &request); + err = mdc_link(sbi->ll_md_exp, &op_data, &request); if (err == 0) ll_update_times(request, 0, dir); @@ -714,7 +714,7 @@ static int ll_mkdir_raw(struct nameidata *nd, int mode) struct inode *dir = nd->dentry->d_inode; struct ptlrpc_request *request = NULL; struct ll_sb_info *sbi = ll_i2sbi(dir); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err; ENTRY; CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n", @@ -729,10 +729,10 @@ static int ll_mkdir_raw(struct nameidata *nd, int mode) LBUG(); } - ll_prepare_mdc_op_data(&op_data, dir, NULL, + ll_prepare_md_op_data(&op_data, dir, NULL, nd->last.name, nd->last.len, 0); - err = mdc_create(sbi->ll_mdc_exp, &op_data, NULL, 0, mode, + err = mdc_create(sbi->ll_md_exp, &op_data, NULL, 0, mode, current->fsuid, current->fsgid, current->cap_effective, 0, &request); if (err == 0) @@ -746,7 +746,7 @@ static int ll_rmdir_raw(struct nameidata *nd) { struct inode *dir = nd->dentry->d_inode; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; struct dentry *dentry; int rc; ENTRY; @@ -763,10 +763,10 @@ static int ll_rmdir_raw(struct nameidata *nd) RETURN(-EBUSY); } - ll_prepare_mdc_op_data(&op_data, dir, NULL, nd->last.name, + ll_prepare_md_op_data(&op_data, dir, NULL, nd->last.name, nd->last.len, S_IFDIR); - rc = mdc_unlink(ll_i2sbi(dir)->ll_mdc_exp, &op_data, &request); + rc = mdc_unlink(ll_i2sbi(dir)->ll_md_exp, &op_data, &request); if (rc == 0) ll_update_times(request, 0, dir); ptlrpc_req_finished(request); @@ -805,14 +805,14 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) GOTO(out, rc = -EPROTO); } - rc = obd_unpackmd(ll_i2obdexp(dir), &lsm, eadata, body->eadatasize); + rc = obd_unpackmd(ll_i2dtexp(dir), &lsm, eadata, body->eadatasize); if (rc < 0) { CERROR("obd_unpackmd: %d\n", rc); GOTO(out, rc); } LASSERT(rc >= sizeof(*lsm)); - rc = obd_checkmd(ll_i2obdexp(dir), ll_i2mdcexp(dir), lsm); + rc = obd_checkmd(ll_i2dtexp(dir), ll_i2mdexp(dir), lsm); if (rc) GOTO(out_free_memmd, rc); @@ -836,13 +836,13 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) } } - rc = obd_destroy(ll_i2obdexp(dir), oa, lsm, &oti, ll_i2mdcexp(dir)); + rc = obd_destroy(ll_i2dtexp(dir), oa, lsm, &oti, ll_i2mdexp(dir)); obdo_free(oa); if (rc) CERROR("obd destroy objid "LPX64" error %d\n", lsm->lsm_object_id, rc); out_free_memmd: - obd_free_memmd(ll_i2obdexp(dir), &lsm); + obd_free_memmd(ll_i2dtexp(dir), &lsm); out: return rc; } @@ -851,16 +851,16 @@ static int ll_unlink_raw(struct nameidata *nd) { struct inode *dir = nd->dentry->d_inode; struct ptlrpc_request *request = NULL; - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int rc; ENTRY; CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n", nd->last.len, nd->last.name, dir->i_ino, dir->i_generation, dir); - ll_prepare_mdc_op_data(&op_data, dir, NULL, + ll_prepare_md_op_data(&op_data, dir, NULL, nd->last.name, nd->last.len, 0); - rc = mdc_unlink(ll_i2sbi(dir)->ll_mdc_exp, &op_data, &request); + rc = mdc_unlink(ll_i2sbi(dir)->ll_md_exp, &op_data, &request); if (rc) GOTO(out, rc); @@ -878,7 +878,7 @@ static int ll_rename_raw(struct nameidata *srcnd, struct nameidata *tgtnd) struct inode *tgt = tgtnd->dentry->d_inode; struct ptlrpc_request *request = NULL; struct ll_sb_info *sbi = ll_i2sbi(src); - struct mdc_op_data op_data = { { 0 } }; + struct md_op_data op_data = { { 0 } }; int err; ENTRY; CDEBUG(D_VFSTRACE,"VFS Op:oldname=%.*s,src_dir=%lu/%u(%p),newname=%.*s," @@ -886,9 +886,9 @@ static int ll_rename_raw(struct nameidata *srcnd, struct nameidata *tgtnd) src->i_ino, src->i_generation, src, tgtnd->last.len, tgtnd->last.name, tgt->i_ino, tgt->i_generation, tgt); - ll_prepare_mdc_op_data(&op_data, src, tgt, NULL, 0, 0); + ll_prepare_md_op_data(&op_data, src, tgt, NULL, 0, 0); - err = mdc_rename(sbi->ll_mdc_exp, &op_data, + err = mdc_rename(sbi->ll_md_exp, &op_data, srcnd->last.name, srcnd->last.len, tgtnd->last.name, tgtnd->last.len, &request); if (!err) { diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index f35154a..8c55247 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -93,7 +93,7 @@ static int ll_brw(int cmd, struct inode *inode, struct obdo *oa, else lprocfs_counter_add(ll_i2sbi(inode)->ll_stats, LPROC_LL_BRW_READ, pg.count); - rc = obd_brw(cmd, ll_i2obdexp(inode), oa, lsm, 1, &pg, NULL); + rc = obd_brw(cmd, ll_i2dtexp(inode), oa, lsm, 1, &pg, NULL); if (rc == 0) obdo_to_inode(inode, oa, OBD_MD_FLBLOCKS); else if (rc != -EIO) @@ -135,7 +135,7 @@ void ll_truncate(struct inode *inode) * race condition. */ lov_stripe_lock(lsm); inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 0); + obd_merge_lvb(ll_i2dtexp(inode), lsm, &lvb, 0); if (lvb.lvb_size == inode->i_size) { CDEBUG(D_VFSTRACE, "skipping punch for obj "LPX64", %Lu=%#Lx\n", lsm->lsm_object_id, inode->i_size, inode->i_size); @@ -143,7 +143,7 @@ void ll_truncate(struct inode *inode) GOTO(out_unlock, 0); } - obd_adjust_kms(ll_i2obdexp(inode), lsm, inode->i_size, 1); + obd_adjust_kms(ll_i2dtexp(inode), lsm, inode->i_size, 1); lov_stripe_unlock(lsm); if (unlikely((ll_i2sbi(inode)->ll_flags & LL_SBI_CHECKSUM) && @@ -175,7 +175,7 @@ void ll_truncate(struct inode *inode) ll_inode_size_unlock(inode, 0); - rc = obd_punch(ll_i2obdexp(inode), &oa, lsm, inode->i_size, + rc = obd_punch(ll_i2dtexp(inode), &oa, lsm, inode->i_size, OBD_OBJECT_EOF, NULL); if (rc) CERROR("obd_truncate fails (%d) ino %lu\n", rc, inode->i_ino); @@ -216,7 +216,7 @@ int ll_prepare_write(struct file *file, struct page *page, unsigned from, oa.o_valid = OBD_MD_FLID | OBD_MD_FLMODE | OBD_MD_FLTYPE; obdo_from_inode(&oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER); - rc = obd_brw(OBD_BRW_CHECK, ll_i2obdexp(inode), &oa, lsm, + rc = obd_brw(OBD_BRW_CHECK, ll_i2dtexp(inode), &oa, lsm, 1, &pga, NULL); if (rc) RETURN(rc); @@ -239,7 +239,7 @@ int ll_prepare_write(struct file *file, struct page *page, unsigned from, * treat it like i_size. */ lov_stripe_lock(lsm); inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 0); + obd_merge_lvb(ll_i2dtexp(inode), lsm, &lvb, 0); lov_stripe_unlock(lsm); if (lvb.lvb_size <= offset) { LL_CDEBUG_PAGE(D_PAGE, page, "kms "LPU64" <= offset "LPU64"\n", @@ -332,7 +332,7 @@ static int ll_ap_refresh_count(void *data, int cmd) lov_stripe_lock(lsm); inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); + obd_merge_lvb(ll_i2dtexp(inode), lsm, &lvb, 1); kms = lvb.lvb_size; lov_stripe_unlock(lsm); @@ -552,7 +552,7 @@ static struct ll_async_page *llap_from_page(struct page *page, unsigned origin) GOTO(out, llap); } - exp = ll_i2obdexp(page->mapping->host); + exp = ll_i2dtexp(page->mapping->host); if (exp == NULL) RETURN(ERR_PTR(-EINVAL)); @@ -725,7 +725,7 @@ int ll_commit_write(struct file *file, struct page *page, unsigned from, if (IS_ERR(llap)) RETURN(PTR_ERR(llap)); - exp = ll_i2obdexp(inode); + exp = ll_i2dtexp(inode); if (exp == NULL) RETURN(-EINVAL); @@ -866,7 +866,7 @@ void ll_removepage(struct page *page) LL_CDEBUG_PAGE(D_PAGE, page, "being evicted\n"); - exp = ll_i2obdexp(inode); + exp = ll_i2dtexp(inode); if (exp == NULL) { CERROR("page %p ind %lu gave null export\n", page, page->index); EXIT; @@ -918,7 +918,7 @@ static int ll_page_matches(struct page *page, int fd_flags) flags = LDLM_FL_TEST_LOCK | LDLM_FL_BLOCK_GRANTED; if (!(fd_flags & LL_FILE_READAHEAD)) flags |= LDLM_FL_CBPENDING; - matches = obd_match(ll_i2sbi(inode)->ll_osc_exp, + matches = obd_match(ll_i2sbi(inode)->ll_dt_exp, ll_i2info(inode)->lli_smd, LDLM_EXTENT, &page_extent, LCK_PR | LCK_PW, &flags, inode, &match_lockh); @@ -1065,7 +1065,7 @@ static int ll_readahead(struct ll_readahead_state *ras, lov_stripe_lock(lsm); inode_init_lvb(inode, &lvb); - obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1); + obd_merge_lvb(ll_i2dtexp(inode), lsm, &lvb, 1); kms = lvb.lvb_size; lov_stripe_unlock(lsm); if (kms == 0) { @@ -1299,7 +1299,7 @@ int ll_writepage(struct page *page) LASSERT(!PageDirty(page)); LASSERT(PageLocked(page)); - exp = ll_i2obdexp(inode); + exp = ll_i2dtexp(inode); if (exp == NULL) GOTO(out, rc = -EINVAL); @@ -1361,7 +1361,7 @@ int ll_readpage(struct file *filp, struct page *page) if (rc < 0) GOTO(out, rc); - exp = ll_i2obdexp(inode); + exp = ll_i2dtexp(inode); if (exp == NULL) GOTO(out, rc = -EINVAL); diff --git a/lustre/llite/rw24.c b/lustre/llite/rw24.c index af1f1e3..1f39574 100644 --- a/lustre/llite/rw24.c +++ b/lustre/llite/rw24.c @@ -113,7 +113,7 @@ static int ll_direct_IO_24(int rw, else lprocfs_counter_add(ll_i2sbi(inode)->ll_stats, LPROC_LL_DIRECT_READ, iobuf->length); - rc = obd_brw_async(rw, ll_i2obdexp(inode), &oa, lsm, iobuf->nr_pages, + rc = obd_brw_async(rw, ll_i2dtexp(inode), &oa, lsm, iobuf->nr_pages, pga, set, NULL); if (rc) { CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR, @@ -128,7 +128,7 @@ static int ll_direct_IO_24(int rw, rc = iobuf->length; if (rw == OBD_BRW_WRITE) { lov_stripe_lock(lsm); - obd_adjust_kms(ll_i2obdexp(inode), lsm, offset, 0); + obd_adjust_kms(ll_i2dtexp(inode), lsm, offset, 0); lov_stripe_unlock(lsm); } } diff --git a/lustre/llite/special.c b/lustre/llite/special.c index 2bc20b3..bf1d707 100644 --- a/lustre/llite/special.c +++ b/lustre/llite/special.c @@ -286,7 +286,7 @@ static int ll_special_release_internal(struct inode *inode, struct file *filp, lprocfs_counter_incr(sbi->ll_stats, LPROC_LL_RELEASE); - err = ll_mdc_close(sbi->ll_mdc_exp, inode, filp); + err = ll_mdc_close(sbi->ll_md_exp, inode, filp); if (err && rc == 0) rc = err; @@ -324,7 +324,7 @@ static int ll_special_open(struct inode *inode, struct file *filp) err = ll_local_open(filp, it, fd); if (rc != 0) { CERROR("error opening special file: rc %d\n", rc); - ll_mdc_close(ll_i2sbi(inode)->ll_mdc_exp, inode, filp); + ll_mdc_close(ll_i2sbi(inode)->ll_md_exp, inode, filp); } else if (err) { if (pfop && *pfop && (*pfop)->release) (*pfop)->release(inode, filp); diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c index e8bf1d6..a142f4c 100644 --- a/lustre/llite/symlink.c +++ b/lustre/llite/symlink.c @@ -46,7 +46,7 @@ static int ll_readlink_internal(struct inode *inode, RETURN(0); } - rc = mdc_getattr(sbi->ll_mdc_exp, ll_inode2fid(inode), + rc = mdc_getattr(sbi->ll_md_exp, ll_inode2fid(inode), OBD_MD_LINKNAME, symlen, request); if (rc) { if (rc != -ENOENT) diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index f689f5d..7bc744b 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -104,7 +104,7 @@ int ll_setxattr_common(struct inode *inode, const char *name, if (rc) RETURN(rc); - rc = mdc_setxattr(sbi->ll_mdc_exp, ll_inode2fid(inode), valid, + rc = mdc_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, name, value, size, 0, flags, &req); if (rc) { if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { @@ -179,7 +179,7 @@ int ll_getxattr_common(struct inode *inode, const char *name, RETURN(rc); do_getxattr: - rc = mdc_getxattr(sbi->ll_mdc_exp, ll_inode2fid(inode), valid, + rc = mdc_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, name, NULL, 0, size, &req); if (rc) { if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 3d495aa..73d6504 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -978,7 +978,7 @@ static int lmv_valid_attrs(struct obd_export *exp, struct lu_fid *fid) RETURN(rc); } -static int lmv_close(struct obd_export *exp, struct mdc_op_data *op_data, +static int lmv_close(struct obd_export *exp, struct md_op_data *op_data, struct obd_client_handle *och, struct ptlrpc_request **request) { @@ -1048,7 +1048,7 @@ cleanup: return rc; } -int lmv_create(struct obd_export *exp, struct mdc_op_data *op_data, +int lmv_create(struct obd_export *exp, struct md_op_data *op_data, const void *data, int datalen, int mode, __u32 uid, __u32 gid, __u64 rdev, struct ptlrpc_request **request) { @@ -1126,32 +1126,32 @@ static int lmv_done_writing(struct obd_export *exp, struct obdo *obdo) static int lmv_enqueue_slaves(struct obd_export *exp, int locktype, struct lookup_intent *it, int lockmode, - struct mdc_op_data *data, struct lustre_handle *lockh, + struct md_op_data *op_data, struct lustre_handle *lockh, void *lmm, int lmmsize, ldlm_completion_callback cb_compl, ldlm_blocking_callback cb_blocking, void *cb_data) { struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; - struct mea *mea = data->mea1; - struct mdc_op_data *data2; + struct mea *mea = op_data->mea1; + struct md_op_data *op_data2; int i, rc, mds; ENTRY; - OBD_ALLOC(data2, sizeof(*data2)); - if (data2 == NULL) + OBD_ALLOC(op_data2, sizeof(*op_data2)); + if (op_data2 == NULL) RETURN(-ENOMEM); LASSERT(mea != NULL); for (i = 0; i < mea->mea_count; i++) { - memset(data2, 0, sizeof(*data2)); - data2->fid1 = mea->mea_ids[i]; - mds = lmv_fld_lookup(obd, &data2->fid1); + memset(op_data2, 0, sizeof(*op_data2)); + op_data2->fid1 = mea->mea_ids[i]; + mds = lmv_fld_lookup(obd, &op_data2->fid1); if (lmv->tgts[mds].ltd_exp == NULL) continue; rc = md_enqueue(lmv->tgts[mds].ltd_exp, locktype, it, - lockmode, data2, lockh + i, lmm, lmmsize, + lockmode, op_data2, lockh + i, lmm, lmmsize, cb_compl, cb_blocking, cb_data); CDEBUG(D_OTHER, "take lock on slave "DFID3" -> %d/%d\n", @@ -1168,10 +1168,10 @@ lmv_enqueue_slaves(struct obd_export *exp, int locktype, GOTO(cleanup, rc = LUSTRE_IT(it)->it_status); } - OBD_FREE(data2, sizeof(*data2)); + OBD_FREE(op_data2, sizeof(*op_data2)); RETURN(0); cleanup: - OBD_FREE(data2, sizeof(*data2)); + OBD_FREE(op_data2, sizeof(*op_data2)); /* drop all taken locks */ while (--i >= 0) { @@ -1185,7 +1185,7 @@ cleanup: static int lmv_enqueue_remote(struct obd_export *exp, int lock_type, struct lookup_intent *it, int lock_mode, - struct mdc_op_data *data, struct lustre_handle *lockh, + struct md_op_data *op_data, struct lustre_handle *lockh, void *lmm, int lmmsize, ldlm_completion_callback cb_compl, ldlm_blocking_callback cb_blocking, void *cb_data) { @@ -1193,7 +1193,7 @@ lmv_enqueue_remote(struct obd_export *exp, int lock_type, struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; struct lustre_handle plock; - struct mdc_op_data rdata; + struct md_op_data rdata; struct mdt_body *body = NULL; int i, rc = 0, pmode; ENTRY; @@ -1205,7 +1205,7 @@ lmv_enqueue_remote(struct obd_export *exp, int lock_type, RETURN(0); CDEBUG(D_OTHER, "ENQUEUE '%s' on "DFID3" -> "DFID3"\n", - LL_IT2STR(it), PFID3(&data->fid1), PFID3(&body->fid1)); + LL_IT2STR(it), PFID3(&op_data->fid1), PFID3(&body->fid1)); /* we got LOOKUP lock, but we really need attrs */ pmode = LUSTRE_IT(it)->it_lock_mode; @@ -1215,7 +1215,7 @@ lmv_enqueue_remote(struct obd_export *exp, int lock_type, LUSTRE_IT(it)->it_data = NULL; LASSERT((body->valid & OBD_MD_FID) != 0); - memcpy(&rdata, data, sizeof(rdata)); + memcpy(&rdata, op_data, sizeof(rdata)); rdata.fid1 = body->fid1; rdata.name = NULL; rdata.namelen = 0; @@ -1234,7 +1234,7 @@ lmv_enqueue_remote(struct obd_export *exp, int lock_type, static int lmv_enqueue(struct obd_export *exp, int lock_type, struct lookup_intent *it, int lock_mode, - struct mdc_op_data *data, struct lustre_handle *lockh, + struct md_op_data *op_data, struct lustre_handle *lockh, void *lmm, int lmmsize, ldlm_completion_callback cb_compl, ldlm_blocking_callback cb_blocking, void *cb_data) { @@ -1248,34 +1248,34 @@ lmv_enqueue(struct obd_export *exp, int lock_type, if (rc) RETURN(rc); - if (data->mea1 && it->it_op == IT_UNLINK) { + if (op_data->mea1 && it->it_op == IT_UNLINK) { rc = lmv_enqueue_slaves(exp, lock_type, it, lock_mode, - data, lockh, lmm, lmmsize, + op_data, lockh, lmm, lmmsize, cb_compl, cb_blocking, cb_data); RETURN(rc); } - if (data->namelen) { - obj = lmv_grab_obj(obd, &data->fid1); + if (op_data->namelen) { + obj = lmv_grab_obj(obd, &op_data->fid1); if (obj) { /* directory is splitted. look for right mds for this * name */ mds = raw_name2idx(obj->lo_hashtype, obj->lo_objcount, - (char *)data->name, data->namelen); - data->fid1 = obj->lo_objs[mds].li_fid; + (char *)op_data->name, op_data->namelen); + op_data->fid1 = obj->lo_objs[mds].li_fid; lmv_put_obj(obj); } } CDEBUG(D_OTHER, "ENQUEUE '%s' on "DFID3"\n", LL_IT2STR(it), - PFID3(&data->fid1)); + PFID3(&op_data->fid1)); - mds = lmv_fld_lookup(obd, &data->fid1); + mds = lmv_fld_lookup(obd, &op_data->fid1); rc = md_enqueue(lmv->tgts[mds].ltd_exp, - lock_type, it, lock_mode, data, lockh, lmm, + lock_type, it, lock_mode, op_data, lockh, lmm, lmmsize, cb_compl, cb_blocking, cb_data); if (rc == 0 && it->it_op == IT_OPEN) rc = lmv_enqueue_remote(exp, lock_type, it, lock_mode, - data, lockh, lmm, lmmsize, + op_data, lockh, lmm, lmmsize, cb_compl, cb_blocking, cb_data); RETURN(rc); } @@ -1348,10 +1348,10 @@ repeat: } /* - * llite passes fid of an target inode in data->fid1 and id of directory in - * data->fid2 + * llite passes fid of an target inode in op_data->fid1 and id of directory in + * op_data->fid2 */ -static int lmv_link(struct obd_export *exp, struct mdc_op_data *data, +static int lmv_link(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **request) { struct obd_device *obd = exp->exp_obd; @@ -1364,37 +1364,37 @@ static int lmv_link(struct obd_export *exp, struct mdc_op_data *data, if (rc) RETURN(rc); - if (data->namelen != 0) { + if (op_data->namelen != 0) { /* usual link request */ - obj = lmv_grab_obj(obd, &data->fid2); + obj = lmv_grab_obj(obd, &op_data->fid2); if (obj) { rc = raw_name2idx(obj->lo_hashtype, obj->lo_objcount, - data->name, data->namelen); - data->fid2 = obj->lo_objs[rc].li_fid; + op_data->name, op_data->namelen); + op_data->fid2 = obj->lo_objs[rc].li_fid; lmv_put_obj(obj); } - mds = lmv_fld_lookup(obd, &data->fid2); + mds = lmv_fld_lookup(obd, &op_data->fid2); CDEBUG(D_OTHER,"link "DFID3":%*s to "DFID3"\n", - PFID3(&data->fid2), data->namelen, data->name, - PFID3(&data->fid1)); + PFID3(&op_data->fid2), op_data->namelen, + op_data->name, PFID3(&op_data->fid1)); } else { - mds = lmv_fld_lookup(obd, &data->fid1); + mds = lmv_fld_lookup(obd, &op_data->fid1); /* request from MDS to acquire i_links for inode by fid1 */ CDEBUG(D_OTHER, "inc i_nlinks for "DFID3"\n", - PFID3(&data->fid1)); + PFID3(&op_data->fid1)); } CDEBUG(D_OTHER, "forward to MDS #%u ("DFID3")\n", - mds, PFID3(&data->fid1)); - rc = md_link(lmv->tgts[mds].ltd_exp, data, request); + mds, PFID3(&op_data->fid1)); + rc = md_link(lmv->tgts[mds].ltd_exp, op_data, request); RETURN(rc); } -static int lmv_rename(struct obd_export *exp, struct mdc_op_data *data, +static int lmv_rename(struct obd_export *exp, struct md_op_data *op_data, const char *old, int oldlen, const char *new, int newlen, struct ptlrpc_request **request) { @@ -1405,8 +1405,8 @@ static int lmv_rename(struct obd_export *exp, struct mdc_op_data *data, ENTRY; CDEBUG(D_OTHER, "rename %*s in "DFID3" to %*s in "DFID3"\n", - oldlen, old, PFID3(&data->fid1), newlen, new, - PFID3(&data->fid2)); + oldlen, old, PFID3(&op_data->fid1), newlen, new, + PFID3(&op_data->fid2)); rc = lmv_check_connect(obd); if (rc) @@ -1420,27 +1420,27 @@ static int lmv_rename(struct obd_export *exp, struct mdc_op_data *data, CDEBUG(D_OTHER, "create %*s(%d/%d) in "DFID3" pointing " "to "DFID3"\n", newlen, new, oldlen, newlen, - PFID3(&data->fid2), PFID3(&data->fid1)); + PFID3(&op_data->fid2), PFID3(&op_data->fid1)); - mds = lmv_fld_lookup(obd, &data->fid2); + mds = lmv_fld_lookup(obd, &op_data->fid2); /* * target directory can be splitted, sowe should forward request * to the right MDS. */ - obj = lmv_grab_obj(obd, &data->fid2); + obj = lmv_grab_obj(obd, &op_data->fid2); if (obj) { mds = raw_name2idx(obj->lo_hashtype, obj->lo_objcount, (char *)new, newlen); - data->fid2 = obj->lo_objs[mds].li_fid; + op_data->fid2 = obj->lo_objs[mds].li_fid; CDEBUG(D_OTHER, "forward to MDS #%u ("DFID3")\n", mds, - PFID3(&data->fid2)); + PFID3(&op_data->fid2)); lmv_put_obj(obj); } goto request; } - obj = lmv_grab_obj(obd, &data->fid1); + obj = lmv_grab_obj(obd, &op_data->fid1); if (obj) { /* * directory is already splitted, so we have to forward request @@ -1448,13 +1448,13 @@ static int lmv_rename(struct obd_export *exp, struct mdc_op_data *data, */ mds = raw_name2idx(obj->lo_hashtype, obj->lo_objcount, (char *)old, oldlen); - data->fid1 = obj->lo_objs[mds].li_fid; + op_data->fid1 = obj->lo_objs[mds].li_fid; CDEBUG(D_OTHER, "forward to MDS #%u ("DFID3")\n", mds, - PFID3(&data->fid1)); + PFID3(&op_data->fid1)); lmv_put_obj(obj); } - obj = lmv_grab_obj(obd, &data->fid2); + obj = lmv_grab_obj(obd, &op_data->fid2); if (obj) { /* * directory is already splitted, so we have to forward request @@ -1463,27 +1463,27 @@ static int lmv_rename(struct obd_export *exp, struct mdc_op_data *data, mds = raw_name2idx(obj->lo_hashtype, obj->lo_objcount, (char *)new, newlen); - data->fid2 = obj->lo_objs[mds].li_fid; + op_data->fid2 = obj->lo_objs[mds].li_fid; CDEBUG(D_OTHER, "forward to MDS #%u ("DFID3")\n", mds, - PFID3(&data->fid2)); + PFID3(&op_data->fid2)); lmv_put_obj(obj); } - mds = lmv_fld_lookup(obd, &data->fid1); + mds = lmv_fld_lookup(obd, &op_data->fid1); request: - if (mds != lmv_fld_lookup(obd, &data->fid2)) { + if (mds != lmv_fld_lookup(obd, &op_data->fid2)) { CDEBUG(D_OTHER,"cross-node rename "DFID3"/%*s to "DFID3"/%*s\n", - PFID3(&data->fid1), oldlen, old, PFID3(&data->fid2), + PFID3(&op_data->fid1), oldlen, old, PFID3(&op_data->fid2), newlen, new); } - rc = md_rename(lmv->tgts[mds].ltd_exp, data, old, oldlen, + rc = md_rename(lmv->tgts[mds].ltd_exp, op_data, old, oldlen, new, newlen, request); RETURN(rc); } -static int lmv_setattr(struct obd_export *exp, struct mdc_op_data *data, +static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data, struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len, void *ea3, int ea3len, struct ptlrpc_request **request) @@ -1500,18 +1500,18 @@ static int lmv_setattr(struct obd_export *exp, struct mdc_op_data *data, if (rc) RETURN(rc); - obj = lmv_grab_obj(obd, &data->fid1); + obj = lmv_grab_obj(obd, &op_data->fid1); CDEBUG(D_OTHER, "SETATTR for "DFID3", valid 0x%x%s\n", - PFID3(&data->fid1), iattr->ia_valid, obj ? ", splitted" : ""); + PFID3(&op_data->fid1), iattr->ia_valid, obj ? ", splitted" : ""); if (obj) { for (i = 0; i < obj->lo_objcount; i++) { - data->fid1 = obj->lo_objs[i].li_fid; + op_data->fid1 = obj->lo_objs[i].li_fid; - mds = lmv_fld_lookup(obd, &data->fid1); + mds = lmv_fld_lookup(obd, &op_data->fid1); rc = md_setattr(lmv->tgts[mds].ltd_exp, - data, iattr, ea, ealen, ea2, ea2len, + op_data, iattr, ea, ealen, ea2, ea2len, ea3, ea3len, &req); if (lu_fid_eq(&obj->lo_fid, &obj->lo_objs[i].li_fid)) { @@ -1529,10 +1529,10 @@ static int lmv_setattr(struct obd_export *exp, struct mdc_op_data *data, } lmv_put_obj(obj); } else { - mds = lmv_fld_lookup(obd, &data->fid1); + mds = lmv_fld_lookup(obd, &op_data->fid1); LASSERT(mds < lmv->desc.ld_tgt_count); rc = md_setattr(lmv->tgts[mds].ltd_exp, - data, iattr, ea, ealen, ea2, ea2len, ea3, + op_data, iattr, ea, ealen, ea2, ea2len, ea3, ea3len, request); if (rc == 0) { body = lustre_msg_buf((*request)->rq_repmsg, 0, @@ -1668,32 +1668,32 @@ static int lmv_readpage(struct obd_export *exp, struct lu_fid *fid, RETURN(rc); } -static int lmv_unlink_slaves(struct obd_export *exp, struct mdc_op_data *data, +static int lmv_unlink_slaves(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **req) { struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; - struct mea *mea = data->mea1; - struct mdc_op_data *data2; + struct mea *mea = op_data->mea1; + struct md_op_data *op_data2; int i, mds, rc = 0; ENTRY; - OBD_ALLOC(data2, sizeof(*data2)); - if (data2 == NULL) + OBD_ALLOC(op_data2, sizeof(*op_data2)); + if (op_data2 == NULL) RETURN(-ENOMEM); LASSERT(mea != NULL); for (i = 0; i < mea->mea_count; i++) { - memset(data2, 0, sizeof(*data2)); - data2->fid1 = mea->mea_ids[i]; - data2->create_mode = MDS_MODE_DONT_LOCK | S_IFDIR; + memset(op_data2, 0, sizeof(*op_data2)); + op_data2->fid1 = mea->mea_ids[i]; + op_data2->create_mode = MDS_MODE_DONT_LOCK | S_IFDIR; - mds = lmv_fld_lookup(obd, &data2->fid1); + mds = lmv_fld_lookup(obd, &op_data2->fid1); if (lmv->tgts[mds].ltd_exp == NULL) continue; rc = md_unlink(lmv->tgts[mds].ltd_exp, - data2, req); + op_data2, req); CDEBUG(D_OTHER, "unlink slave "DFID3" -> %d\n", PFID3(&mea->mea_ids[i]), rc); @@ -1705,7 +1705,7 @@ static int lmv_unlink_slaves(struct obd_export *exp, struct mdc_op_data *data, if (rc) RETURN(rc); } - OBD_FREE(data2, sizeof(*data2)); + OBD_FREE(op_data2, sizeof(*op_data2)); RETURN(rc); } @@ -1721,7 +1721,7 @@ static int lmv_delete_inode(struct obd_export *exp, struct lu_fid *fid) RETURN(0); } -static int lmv_unlink(struct obd_export *exp, struct mdc_op_data *data, +static int lmv_unlink(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **request) { struct obd_device *obd = exp->exp_obd; @@ -1733,31 +1733,31 @@ static int lmv_unlink(struct obd_export *exp, struct mdc_op_data *data, if (rc) RETURN(rc); - if (data->namelen == 0 && data->mea1 != NULL) { + if (op_data->namelen == 0 && op_data->mea1 != NULL) { /* mds asks to remove slave objects */ - rc = lmv_unlink_slaves(exp, data, request); + rc = lmv_unlink_slaves(exp, op_data, request); RETURN(rc); } - if (data->namelen != 0) { + if (op_data->namelen != 0) { struct lmv_obj *obj; - obj = lmv_grab_obj(obd, &data->fid1); + obj = lmv_grab_obj(obd, &op_data->fid1); if (obj) { i = raw_name2idx(obj->lo_hashtype, obj->lo_objcount, - data->name, data->namelen); - data->fid1 = obj->lo_objs[i].li_fid; + op_data->name, op_data->namelen); + op_data->fid1 = obj->lo_objs[i].li_fid; lmv_put_obj(obj); } CDEBUG(D_OTHER, "unlink '%*s' in "DFID3" -> %u\n", - data->namelen, data->name, PFID3(&data->fid1), + op_data->namelen, op_data->name, PFID3(&op_data->fid1), i); } else { CDEBUG(D_OTHER, "drop i_nlink on "DFID3"\n", - PFID3(&data->fid1)); + PFID3(&op_data->fid1)); } - i = lmv_fld_lookup(obd, &data->fid1); - rc = md_unlink(lmv->tgts[i].ltd_exp, data, request); + i = lmv_fld_lookup(obd, &op_data->fid1); + rc = md_unlink(lmv->tgts[i].ltd_exp, op_data, request); RETURN(rc); } diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index 63c8e38..f4022b1 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -5,28 +5,28 @@ void mdc_pack_rep_body(struct ptlrpc_request *); void mdc_readdir_pack(struct ptlrpc_request *req, int pos, __u64 offset, __u32 size, struct lu_fid *fid); void mdc_getattr_pack(struct ptlrpc_request *req, int valid, int offset, - int flags, struct mdc_op_data *data); + int flags, struct md_op_data *op_data); void mdc_setattr_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, + struct md_op_data *op_data, struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len); void mdc_create_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, const void *data, int datalen, + struct md_op_data *op_data, const void *data, int datalen, __u32 mode, __u32 uid, __u32 gid, __u32 cap_effective, __u64 rdev); void mdc_open_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u32 mode, __u64 rdev, + struct md_op_data *op_data, __u32 mode, __u64 rdev, __u32 flags, const void *data, int datalen); void mdc_join_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u64 head_size); + struct md_op_data *op_data, __u64 head_size); void mdc_unlink_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data); + struct md_op_data *op_data); void mdc_link_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data); + struct md_op_data *op_data); void mdc_rename_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, + struct md_op_data *op_data, const char *old, int oldlen, const char *new, int newlen); -void mdc_close_pack(struct ptlrpc_request *req, int offset, struct mdc_op_data *op_data, +void mdc_close_pack(struct ptlrpc_request *req, int offset, struct md_op_data *op_data, int valid, struct obd_client_handle *och); struct mdc_open_data { diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index 26e06d7..d939bc3 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -76,7 +76,7 @@ void mdc_pack_req_body(struct ptlrpc_request *req, int offset, } /* packing of MDS records */ void mdc_create_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, const void *data, int datalen, + struct md_op_data *op_data, const void *data, int datalen, __u32 mode, __u32 uid, __u32 gid, __u32 cap_effective, __u64 rdev) { @@ -125,7 +125,7 @@ static __u32 mds_pack_open_flags(__u32 flags) /* packing of MDS records */ void mdc_join_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u64 head_size) + struct md_op_data *op_data, __u64 head_size) { struct mdt_rec_join *rec; @@ -136,7 +136,7 @@ void mdc_join_pack(struct ptlrpc_request *req, int offset, } void mdc_open_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, __u32 mode, __u64 rdev, + struct md_op_data *op_data, __u32 mode, __u64 rdev, __u32 flags, const void *lmm, int lmmlen) { struct mdt_rec_create *rec; @@ -171,7 +171,7 @@ void mdc_open_pack(struct ptlrpc_request *req, int offset, } void mdc_setattr_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, struct iattr *iattr, + struct md_op_data *op_data, struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len) { struct mdt_rec_setattr *rec = lustre_msg_buf(req->rq_reqmsg, offset, @@ -180,7 +180,7 @@ void mdc_setattr_pack(struct ptlrpc_request *req, int offset, rec->sa_fsuid = current->fsuid; rec->sa_fsgid = current->fsgid; rec->sa_cap = current->cap_effective; - rec->sa_fid = data->fid1; + rec->sa_fid = op_data->fid1; rec->sa_suppgid = -1; if (iattr) { @@ -196,7 +196,7 @@ void mdc_setattr_pack(struct ptlrpc_request *req, int offset, if ((iattr->ia_valid & ATTR_GID) && in_group_p(iattr->ia_gid)) rec->sa_suppgid = iattr->ia_gid; else - rec->sa_suppgid = data->suppgids[0]; + rec->sa_suppgid = op_data->suppgids[0]; } if (ealen == 0) @@ -211,7 +211,7 @@ void mdc_setattr_pack(struct ptlrpc_request *req, int offset, } void mdc_unlink_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data) + struct md_op_data *op_data) { struct mdt_rec_unlink *rec; char *tmp; @@ -223,19 +223,19 @@ void mdc_unlink_pack(struct ptlrpc_request *req, int offset, rec->ul_fsuid = current->fsuid; rec->ul_fsgid = current->fsgid; rec->ul_cap = current->cap_effective; - rec->ul_mode = data->create_mode; - rec->ul_suppgid = data->suppgids[0]; - rec->ul_fid1 = data->fid1; - rec->ul_fid2 = data->fid2; - rec->ul_time = data->mod_time; + rec->ul_mode = op_data->create_mode; + rec->ul_suppgid = op_data->suppgids[0]; + rec->ul_fid1 = op_data->fid1; + rec->ul_fid2 = op_data->fid2; + rec->ul_time = op_data->mod_time; - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, data->namelen + 1); + tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, op_data->namelen + 1); LASSERT (tmp != NULL); - LOGL0(data->name, data->namelen, tmp); + LOGL0(op_data->name, op_data->namelen, tmp); } void mdc_link_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data) + struct md_op_data *op_data) { struct mdt_rec_link *rec; char *tmp; @@ -246,18 +246,18 @@ void mdc_link_pack(struct ptlrpc_request *req, int offset, rec->lk_fsuid = current->fsuid; rec->lk_fsgid = current->fsgid; rec->lk_cap = current->cap_effective; - rec->lk_suppgid1 = data->suppgids[0]; - rec->lk_suppgid2 = data->suppgids[1]; - rec->lk_fid1 = data->fid1; - rec->lk_fid2 = data->fid2; - rec->lk_time = data->mod_time; - - tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, data->namelen + 1); - LOGL0(data->name, data->namelen, tmp); + rec->lk_suppgid1 = op_data->suppgids[0]; + rec->lk_suppgid2 = op_data->suppgids[1]; + rec->lk_fid1 = op_data->fid1; + rec->lk_fid2 = op_data->fid2; + rec->lk_time = op_data->mod_time; + + tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, op_data->namelen + 1); + LOGL0(op_data->name, op_data->namelen, tmp); } void mdc_rename_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *data, + struct md_op_data *op_data, const char *old, int oldlen, const char *new, int newlen) { struct mdt_rec_rename *rec; @@ -270,11 +270,11 @@ void mdc_rename_pack(struct ptlrpc_request *req, int offset, rec->rn_fsuid = current->fsuid; rec->rn_fsgid = current->fsgid; rec->rn_cap = current->cap_effective; - rec->rn_suppgid1 = data->suppgids[0]; - rec->rn_suppgid2 = data->suppgids[1]; - rec->rn_fid1 = data->fid1; - rec->rn_fid2 = data->fid2; - rec->rn_time = data->mod_time; + rec->rn_suppgid1 = op_data->suppgids[0]; + rec->rn_suppgid2 = op_data->suppgids[1]; + rec->rn_fid1 = op_data->fid1; + rec->rn_fid2 = op_data->fid2; + rec->rn_time = op_data->mod_time; tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, oldlen + 1); LOGL0(old, oldlen, tmp); @@ -286,7 +286,7 @@ void mdc_rename_pack(struct ptlrpc_request *req, int offset, } void mdc_getattr_pack(struct ptlrpc_request *req, int offset, int valid, - int flags, struct mdc_op_data *data) + int flags, struct md_op_data *op_data) { struct mdt_body *b; b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*b)); @@ -296,19 +296,19 @@ void mdc_getattr_pack(struct ptlrpc_request *req, int offset, int valid, b->capability = current->cap_effective; b->valid = valid; b->flags = flags; - b->suppgid = data->suppgids[0]; + b->suppgid = op_data->suppgids[0]; - b->fid1 = data->fid1; - if (data->name) { + b->fid1 = op_data->fid1; + if (op_data->name) { char *tmp; tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, - data->namelen + 1); - LOGL0(data->name, data->namelen, tmp); + op_data->namelen + 1); + LOGL0(op_data->name, op_data->namelen, tmp); } } void mdc_close_pack(struct ptlrpc_request *req, int offset, - struct mdc_op_data *op_data, int valid, + struct md_op_data *op_data, int valid, struct obd_client_handle *och) { struct mdt_body *body; diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 4004e35..513a3fb 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -235,7 +235,7 @@ int mdc_enqueue(struct obd_export *exp, int lock_type, struct lookup_intent *it, int lock_mode, - struct mdc_op_data *data, + struct md_op_data *op_data, struct lustre_handle *lockh, void *lmm, int lmmsize, @@ -246,7 +246,7 @@ int mdc_enqueue(struct obd_export *exp, struct ptlrpc_request *req; struct obd_device *obddev = class_exp2obd(exp); struct ldlm_res_id res_id = - { .name = {fid_seq(&data->fid1), fid_num(&data->fid1)} }; + { .name = {fid_seq(&op_data->fid1), fid_num(&op_data->fid1)} }; ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_LOOKUP } }; struct ldlm_request *lockreq; struct ldlm_intent *lit; @@ -270,7 +270,7 @@ int mdc_enqueue(struct obd_export *exp, it->it_create_mode |= S_IFREG; size[req_buffers++] = sizeof(struct mdt_rec_create); - size[req_buffers++] = data->namelen + 1; + size[req_buffers++] = op_data->namelen + 1; /* As an optimization, we allocate an RPC request buffer for * at least a default-sized LOV EA even if we aren't sending * one. We grow the whole request to the next power-of-two @@ -297,7 +297,7 @@ int mdc_enqueue(struct obd_export *exp, req_buffers, size, NULL); /* when joining file, cb_data and lmm args together * indicate the head file size*/ - mdc_join_pack(req, req_buffers - 1, data, + mdc_join_pack(req, req_buffers - 1, op_data, (head_size << 32) | tsize); cb_data = NULL; lmm = NULL; @@ -318,14 +318,14 @@ int mdc_enqueue(struct obd_export *exp, lit->opc = (__u64)it->it_op; /* pack the intended request */ - mdc_open_pack(req, MDS_REQ_INTENT_REC_OFF, data, + mdc_open_pack(req, MDS_REQ_INTENT_REC_OFF, op_data, it->it_create_mode, 0, it->it_flags, lmm, lmmsize); repsize[repbufcnt++] = LUSTRE_POSIX_ACL_MAX_SIZE; } else if (it->it_op & IT_UNLINK) { size[req_buffers++] = sizeof(struct mdt_rec_unlink); - size[req_buffers++] = data->namelen + 1; + size[req_buffers++] = op_data->namelen + 1; policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_DLM_VERSION, LDLM_ENQUEUE, req_buffers, size, NULL); @@ -338,14 +338,14 @@ int mdc_enqueue(struct obd_export *exp, lit->opc = (__u64)it->it_op; /* pack the intended request */ - mdc_unlink_pack(req, MDS_REQ_INTENT_REC_OFF, data); + mdc_unlink_pack(req, MDS_REQ_INTENT_REC_OFF, op_data); /* get ready for the reply */ repsize[repbufcnt++] = obddev->u.cli.cl_max_mds_cookiesize; } else if (it->it_op & (IT_GETATTR | IT_LOOKUP)) { obd_valid valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE | OBD_MD_FLACL | OBD_MD_FLMODEASIZE; size[req_buffers++] = sizeof(struct mdt_body); - size[req_buffers++] = data->namelen + 1; + size[req_buffers++] = op_data->namelen + 1; if (it->it_op & IT_GETATTR) policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; @@ -362,7 +362,7 @@ int mdc_enqueue(struct obd_export *exp, /* pack the intended request */ mdc_getattr_pack(req, MDS_REQ_INTENT_REC_OFF, valid, - it->it_flags, data); + it->it_flags, op_data); /* get ready for the reply */ repsize[repbufcnt++] = LUSTRE_POSIX_ACL_MAX_SIZE; } else if (it->it_op == IT_READDIR) { @@ -528,7 +528,7 @@ EXPORT_SYMBOL(mdc_enqueue); * Else, if DISP_LOOKUP_EXECD then d.lustre.it_status is the rc of the * child lookup. */ -int mdc_intent_lock(struct obd_export *exp, struct mdc_op_data *op_data, +int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, void *lmm, int lmmsize, struct lookup_intent *it, int lookup_flags, struct ptlrpc_request **reqp, ldlm_blocking_callback cb_blocking, int extra_lock_flags) diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index 9b1f7fa..9d05b87 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -66,7 +66,7 @@ static int mdc_reint(struct ptlrpc_request *request, * If it is called with iattr->ia_valid & ATTR_FROM_OPEN, then it is a * magic open-path setattr that should take the setattr semaphore and * go to the setattr portal. */ -int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data, +int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len, struct ptlrpc_request **request) { @@ -101,7 +101,7 @@ int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data, if (iattr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) CDEBUG(D_INODE, "setting mtime %lu, ctime %lu\n", LTIME_S(iattr->ia_mtime), LTIME_S(iattr->ia_ctime)); - mdc_setattr_pack(req, MDS_REQ_REC_OFF, data, iattr, ea, ealen, ea2, ea2len); + mdc_setattr_pack(req, MDS_REQ_REC_OFF, op_data, iattr, ea, ealen, ea2, ea2len); size[0] = sizeof(struct mdt_body); req->rq_replen = lustre_msg_size(1, size); @@ -114,7 +114,7 @@ int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data, RETURN(rc); } -int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data, +int mdc_create(struct obd_export *exp, struct md_op_data *op_data, const void *data, int datalen, int mode, __u32 uid, __u32 gid, __u32 cap_effective, __u64 rdev, struct ptlrpc_request **request) { @@ -155,12 +155,12 @@ int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data, RETURN(rc); } -int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, +int mdc_unlink(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **request) { struct obd_device *obd = class_exp2obd(exp); struct ptlrpc_request *req = *request; - int rc, size[] = { sizeof(struct mdt_rec_unlink), data->namelen + 1}; + int rc, size[] = { sizeof(struct mdt_rec_unlink), op_data->namelen + 1}; ENTRY; LASSERT(req == NULL); @@ -175,7 +175,7 @@ int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, size[2] = obd->u.cli.cl_max_mds_cookiesize; req->rq_replen = lustre_msg_size(3, size); - mdc_unlink_pack(req, MDS_REQ_REC_OFF, data); + mdc_unlink_pack(req, MDS_REQ_REC_OFF, op_data); rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL); if (rc == -ERESTARTSYS) @@ -183,12 +183,12 @@ int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, RETURN(rc); } -int mdc_link(struct obd_export *exp, struct mdc_op_data *data, +int mdc_link(struct obd_export *exp, struct md_op_data *op_data, struct ptlrpc_request **request) { struct obd_device *obd = exp->exp_obd; struct ptlrpc_request *req; - int rc, size[] = { sizeof(struct mdt_rec_link), data->namelen + 1}; + int rc, size[] = { sizeof(struct mdt_rec_link), op_data->namelen + 1}; ENTRY; req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION, @@ -196,7 +196,7 @@ int mdc_link(struct obd_export *exp, struct mdc_op_data *data, if (req == NULL) RETURN(-ENOMEM); - mdc_link_pack(req, MDS_REQ_REC_OFF, data); + mdc_link_pack(req, MDS_REQ_REC_OFF, op_data); size[0] = sizeof(struct mdt_body); req->rq_replen = lustre_msg_size(1, size); @@ -209,7 +209,7 @@ int mdc_link(struct obd_export *exp, struct mdc_op_data *data, RETURN(rc); } -int mdc_rename(struct obd_export *exp, struct mdc_op_data *data, +int mdc_rename(struct obd_export *exp, struct md_op_data *op_data, const char *old, int oldlen, const char *new, int newlen, struct ptlrpc_request **request) { @@ -223,7 +223,7 @@ int mdc_rename(struct obd_export *exp, struct mdc_op_data *data, if (req == NULL) RETURN(-ENOMEM); - mdc_rename_pack(req, MDS_REQ_REC_OFF, data, old, oldlen, new, newlen); + mdc_rename_pack(req, MDS_REQ_REC_OFF, op_data, old, oldlen, new, newlen); size[0] = sizeof(struct mdt_body); size[1] = obd->u.cli.cl_max_mds_easize; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index bf87f64..3155f4b 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -583,7 +583,7 @@ static void mdc_commit_close(struct ptlrpc_request *req) spin_unlock(&open_req->rq_lock); } -int mdc_close(struct obd_export *exp, struct mdc_op_data *op_data, +int mdc_close(struct obd_export *exp, struct md_op_data *op_data, struct obd_client_handle *och, struct ptlrpc_request **request) { struct obd_device *obd = class_exp2obd(exp); @@ -659,7 +659,7 @@ int mdc_close(struct obd_export *exp, struct mdc_op_data *op_data, return rc; } -int mdc_done_writing(struct obd_export *exp, struct mdc_op_data *op_data) +int mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data) { struct ptlrpc_request *req; struct mdt_body *body;