Whamcloud - gitweb
- changes with names on exports and another fields in llite and mds. lov_exp is
authoryury <yury>
Tue, 22 Feb 2005 16:37:48 +0000 (16:37 +0000)
committeryury <yury>
Tue, 22 Feb 2005 16:37:48 +0000 (16:37 +0000)
renamed to dt_exp and lmv_exp is renamed to md_exp. Related changes.

- removed OBD_MD_FID. And fid is now fetched on MDS on all constructive requests. It
is not fetched on unlink(), rename(), etc. This is because OBD_MD_FID flag lost
the sense as lmv layer needs it for all operations (to check if object is splitted).

37 files changed:
lustre/include/linux/lustre_idl.h
lustre/include/linux/obd.h
lustre/liblustre/dir.c
lustre/liblustre/file.c
lustre/liblustre/llite_lib.h
lustre/liblustre/namei.c
lustre/liblustre/rw.c
lustre/liblustre/super.c
lustre/llite/dcache.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_close.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/llite_nfs.c
lustre/llite/namei.c
lustre/llite/rw.c
lustre/llite/rw24.c
lustre/llite/special.c
lustre/llite/symlink.c
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_obd.c
lustre/lvfs/fsfilt_ext3.c
lustre/mdc/mdc_locks.c
lustre/mds/handler.c
lustre/mds/lproc_mds.c
lustre/mds/mds_fs.c
lustre/mds/mds_internal.h
lustre/mds/mds_lib.c
lustre/mds/mds_lmv.c
lustre/mds/mds_log.c
lustre/mds/mds_lov.c
lustre/mds/mds_open.c
lustre/mds/mds_reint.c
lustre/mds/mds_unlink_open.c
lustre/ptlrpc/llog_server.c
lustre/tests/run-llog.sh

index 21a7278..9e7a12d 100644 (file)
@@ -379,7 +379,6 @@ struct lov_mds_md_v0 {            /* LOV EA mds/wire data (little-endian) */
 #define OBD_MD_MDS      (0x0000000010000000)    /* where an inode lives on */
 #define OBD_MD_FLDIREA  (0x0000000020000000)    /* dir's extended attribute data */
 #define OBD_MD_REINT    (0x0000000040000000)    /* reintegrate oa */
-#define OBD_MD_FID      (0x0000000080000000)    /* take care about fid component */
 
 #define OBD_MD_FLNOTOBD (~(OBD_MD_FLBLOCKS | OBD_MD_LINKNAME |          \
                            OBD_MD_FLEASIZE | OBD_MD_FLHANDLE |          \
index 7561d41..5cb53f7 100644 (file)
@@ -354,37 +354,37 @@ struct mds_obd {
         struct dentry                   *mds_logs_dir;
         struct dentry                   *mds_objects_dir;
         struct llog_handle              *mds_cfg_llh;
-        struct obd_device               *mds_lov_obd;
-        struct obd_uuid                  mds_lov_uuid;
         char                            *mds_profile;
-        struct obd_export               *mds_lov_exp;
-        int                              mds_has_lov_desc;
-        struct lov_desc                  mds_lov_desc;
-        obd_id                          *mds_lov_objids;
-        int                              mds_lov_objids_valid;
-        int                              mds_lov_nextid_set;
-        struct file                     *mds_lov_objid_filp;
-        spinlock_t                       mds_lov_lock;
+        struct obd_device               *mds_dt_obd;
+        struct obd_uuid                  mds_dt_uuid;
+        struct obd_export               *mds_dt_exp;
+        int                              mds_has_dt_desc;
+        struct lov_desc                  mds_dt_desc;
+        obd_id                          *mds_dt_objids;
+        int                              mds_dt_objids_valid;
+        int                              mds_dt_nextid_set;
+        struct file                     *mds_dt_objid_filp;
+        spinlock_t                       mds_dt_lock;
         unsigned long                   *mds_client_bitmap;
         struct semaphore                 mds_orphan_recovery_sem;
         
         int                              mds_num;
         int                              mds_config_version;
 
-        char                            *mds_lmv_name;
-        struct obd_device               *mds_lmv_obd;
-        struct obd_export               *mds_lmv_exp;
+        char                            *mds_md_name;
+        struct obd_device               *mds_md_obd;
+        struct obd_export               *mds_md_exp;
+        struct semaphore                 mds_md_sem;
+        struct obd_uuid                  mds_md_uuid;
+        int                              mds_md_connected;
 
         struct ptlrpc_service           *mds_create_service;
-        struct semaphore                 mds_lmv_sem;
         uid_t                            mds_squash_uid;
         gid_t                            mds_squash_gid;
         ptl_nid_t                        mds_nosquash_nid;
         atomic_t                         mds_real_clients;
-        struct obd_uuid                  mds_lmv_uuid;
         struct dentry                   *mds_id_dir;
         int                              mds_obd_type;
-        int                              mds_lmv_connected;
         struct dentry                   *mds_unnamed_dir; /* for mdt_obd_create only */
 };
 
index b50e458..0200da9 100644 (file)
@@ -59,7 +59,7 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page)
         struct mds_body *body;
         struct lookup_intent it = { .it_op = IT_READDIR };
         struct mdc_op_data data;
-        struct obd_device *obddev = class_exp2obd(sbi->ll_lmv_exp);
+        struct obd_device *obddev = class_exp2obd(sbi->ll_md_exp);
         struct ldlm_res_id res_id =
                 { .name = {id_fid(&lli->lli_id), id_group(&lli->lli_id)} };
         ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_UPDATE } };
@@ -70,7 +70,7 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page)
         if (!rc) {
                 llu_prepare_mdc_data(&data, inode, NULL, NULL, 0, 0);
 
-                rc = mdc_enqueue(sbi->ll_lmv_exp, LDLM_IBITS, &it, LCK_PR,
+                rc = mdc_enqueue(sbi->ll_md_exp, LDLM_IBITS, &it, LCK_PR,
                                  &data, &lockh, NULL, 0,
                                  ldlm_completion_ast, llu_mdc_blocking_ast,
                                  inode);
@@ -89,7 +89,7 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page)
                     S_IFDIR, 0, 0);
 
         offset = page->index << PAGE_SHIFT;
-        rc = mdc_readpage(sbi->ll_lmv_exp, &id, offset, page, &request);
+        rc = mdc_readpage(sbi->ll_md_exp, &id, offset, page, &request);
         if (!rc) {
                 body = lustre_msg_buf(request->rq_repmsg, 0, sizeof (*body));
                 LASSERT (body != NULL);         /* checked by mdc_readpage() */
index 4436909..00a0b82 100644 (file)
@@ -107,7 +107,7 @@ static int llu_local_open(struct llu_inode_info *lli, struct lookup_intent *it)
 
         OBD_ALLOC(fd, sizeof(*fd));
         /* We can't handle this well without reorganizing ll_file_open and
-         * ll_mdc_close, so don't even try right now. */
+         * ll_md_close(), so don't even try right now. */
         LASSERT(fd != NULL);
 
         memcpy(&fd->fd_mds_och.och_fh, &body->handle, sizeof(body->handle));
@@ -225,7 +225,7 @@ int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
                 GOTO(out, rc = -EPROTO);
         }
 
-        rc = obd_unpackmd(llu_i2obdexp(dir), &lsm, eadata, body->eadatasize);
+        rc = obd_unpackmd(llu_i2dtexp(dir), &lsm, eadata, body->eadatasize);
         if (rc < 0) {
                 CERROR("obd_unpackmd: %d\n", rc);
                 GOTO(out, rc);
@@ -252,13 +252,13 @@ int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
                 }
         }
 
-        rc = obd_destroy(llu_i2obdexp(dir), oa, lsm, &oti);
+        rc = obd_destroy(llu_i2dtexp(dir), oa, lsm, &oti);
         obdo_free(oa);
         if (rc)
                 CERROR("obd destroy objid 0x"LPX64" error %d\n",
                        lsm->lsm_object_id, rc);
  out_free_memmd:
-        obd_free_memmd(llu_i2obdexp(dir), &lsm);
+        obd_free_memmd(llu_i2dtexp(dir), &lsm);
  out:
         return rc;
 }
@@ -340,7 +340,7 @@ int llu_file_release(struct inode *inode)
         if (!fd) /* no process opened the file after an mcreate */
                 RETURN(0);
 
-        rc2 = llu_mdc_close(sbi->ll_lmv_exp, inode);
+        rc2 = llu_mdc_close(sbi->ll_md_exp, inode);
         if (rc2 && !rc)
                 rc = rc2;
 
@@ -405,7 +405,7 @@ static void llu_truncate(struct inode *inode)
                oa.o_id, lli->lli_st_size);
 
         /* truncate == punch from new size to absolute end of file */
-        err = obd_punch(llu_i2obdexp(inode), &oa, lsm, lli->lli_st_size,
+        err = obd_punch(llu_i2dtexp(inode), &oa, lsm, lli->lli_st_size,
                         OBD_OBJECT_EOF, NULL);
         if (err)
                 CERROR("obd_truncate fails (%d) ino %lu\n", err, lli->lli_st_ino);
index b805622..9a3b6cc 100644 (file)
@@ -45,8 +45,8 @@ struct ll_file_data {
 struct llu_sb_info
 {
         struct obd_uuid         ll_sb_uuid;
-        struct obd_export      *ll_lmv_exp;
-        struct obd_export      *ll_lov_exp;
+        struct obd_export      *ll_md_exp;
+        struct obd_export      *ll_dt_exp;
         obd_id                  ll_rootino;
         int                     ll_flags;
         struct list_head        ll_conn_chain;
@@ -123,14 +123,14 @@ static inline struct llu_sb_info *llu_i2sbi(struct inode *inode)
         return llu_i2info(inode)->lli_sbi;
 }
 
-static inline struct obd_export *llu_i2obdexp(struct inode *inode)
+static inline struct obd_export *llu_i2dtexp(struct inode *inode)
 {
-        return llu_i2info(inode)->lli_sbi->ll_lov_exp;
+        return llu_i2info(inode)->lli_sbi->ll_dt_exp;
 }
 
-static inline struct obd_export *llu_i2mdcexp(struct inode *inode)
+static inline struct obd_export *llu_i2mdexp(struct inode *inode)
 {
-        return llu_i2info(inode)->lli_sbi->ll_lmv_exp;
+        return llu_i2info(inode)->lli_sbi->ll_md_exp;
 }
 
 static inline int llu_is_root_inode(struct inode *inode)
index a0bc94d..280c1dd 100644 (file)
@@ -194,8 +194,8 @@ static int pnode_revalidate_finish(struct ptlrpc_request *req,
         if (it_disposition(it, DISP_LOOKUP_NEG))
                 RETURN(-ENOENT);
 
-        rc = mdc_req2lustre_md(llu_i2sbi(inode)->ll_lmv_exp, req, offset, 
-                               llu_i2sbi(inode)->ll_lov_exp, &md);
+        rc = mdc_req2lustre_md(llu_i2sbi(inode)->ll_md_exp, req, offset, 
+                               llu_i2sbi(inode)->ll_dt_exp, &md);
         if (rc)
                 RETURN(rc);
 
@@ -242,7 +242,7 @@ int llu_pb_revalidate(struct pnode *pnode, int flags, struct lookup_intent *it)
                 }
         }
 
-        exp = llu_i2mdcexp(pb->pb_ino);
+        exp = llu_i2mdexp(pb->pb_ino);
         ll_inode2id(&pid, pnode->p_parent->p_base->pb_ino);
         ll_inode2id(&cid, pb->pb_ino);
         icbd.icbd_parent = pnode->p_parent->p_base->pb_ino;
@@ -330,8 +330,8 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset,
                 struct llu_inode_info *lli;
                 ENTRY;
 
-                rc = mdc_req2lustre_md(sbi->ll_lmv_exp, request, offset, 
-                                       sbi->ll_lov_exp, &md);
+                rc = mdc_req2lustre_md(sbi->ll_md_exp, request, offset, 
+                                       sbi->ll_dt_exp, &md);
                 if (rc)
                         RETURN(rc);
 
@@ -339,11 +339,11 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset,
                 if (!inode || IS_ERR(inode)) {
                         /* free the lsm if we allocated one above */
                         if (md.lsm != NULL)
-                                obd_free_memmd(sbi->ll_lov_exp, &md.lsm);
+                                obd_free_memmd(sbi->ll_dt_exp, &md.lsm);
                         RETURN(inode ? PTR_ERR(inode) : -ENOMEM);
                 } else if (md.lsm != NULL &&
                            llu_i2info(inode)->lli_smd != md.lsm) {
-                        obd_free_memmd(sbi->ll_lov_exp, &md.lsm);
+                        obd_free_memmd(sbi->ll_dt_exp, &md.lsm);
                 }
 
                 lli = llu_i2info(inode);
@@ -415,7 +415,7 @@ static int llu_lookup_it(struct inode *parent, struct pnode *pnode,
         icbd.icbd_child = pnode;
         ll_inode2id(&pid, parent);
 
-        rc = mdc_intent_lock(llu_i2mdcexp(parent), &pid,
+        rc = mdc_intent_lock(llu_i2mdexp(parent), &pid,
                              pnode->p_base->pb_name.name,
                              pnode->p_base->pb_name.len,
                              NULL, 0, NULL, it, flags, &req,
index faeed7d..5de64a6 100644 (file)
@@ -78,7 +78,7 @@ static int llu_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock
 {
         struct llu_inode_info *lli = llu_i2info(inode);
         struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp = llu_i2obdexp(inode);
+        struct obd_export *exp = llu_i2dtexp(inode);
         struct {
                 char name[16];
                 struct ldlm_lock *lock;
@@ -223,7 +223,7 @@ int llu_glimpse_size(struct inode *inode)
 
         CDEBUG(D_DLMTRACE, "Glimpsing inode %lu\n", lli->lli_st_ino);
 
-        rc = obd_enqueue(sbi->ll_lov_exp, lli->lli_smd, LDLM_EXTENT, &policy,
+        rc = obd_enqueue(sbi->ll_dt_exp, lli->lli_smd, LDLM_EXTENT, &policy,
                          LCK_PR, &flags, llu_extent_lock_callback,
                          ldlm_completion_ast, llu_glimpse_callback, inode,
                          sizeof(struct ost_lvb), lustre_swab_ost_lvb, &lockh);
@@ -239,7 +239,7 @@ int llu_glimpse_size(struct inode *inode)
         CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %lu\n",
                lli->lli_st_size, lli->lli_st_blocks);
 
-        obd_cancel(sbi->ll_lov_exp, lli->lli_smd, LCK_PR, &lockh);
+        obd_cancel(sbi->ll_dt_exp, lli->lli_smd, LCK_PR, &lockh);
 
         RETURN(rc);
 }
@@ -264,7 +264,7 @@ int llu_extent_lock(struct ll_file_data *fd, struct inode *inode,
         CDEBUG(D_DLMTRACE, "Locking inode %lu, start "LPU64" end "LPU64"\n",
                lli->lli_st_ino, policy->l_extent.start, policy->l_extent.end);
 
-        rc = obd_enqueue(sbi->ll_lov_exp, lsm, LDLM_EXTENT, policy, mode,
+        rc = obd_enqueue(sbi->ll_dt_exp, lsm, LDLM_EXTENT, policy, mode,
                          &ast_flags, llu_extent_lock_callback,
                          ldlm_completion_ast, llu_glimpse_callback, inode,
                          sizeof(struct ost_lvb), lustre_swab_ost_lvb, lockh);
@@ -293,7 +293,7 @@ int llu_extent_unlock(struct ll_file_data *fd, struct inode *inode,
             (sbi->ll_flags & LL_SBI_NOLCK))
                 RETURN(0);
 
-        rc = obd_cancel(sbi->ll_lov_exp, lsm, mode, lockh);
+        rc = obd_cancel(sbi->ll_dt_exp, lsm, mode, lockh);
 
         RETURN(rc);
 }
@@ -378,7 +378,7 @@ static int llu_queue_pio(int cmd, struct llu_io_group *group,
 {
         struct llu_inode_info *lli = llu_i2info(group->lig_inode);
         struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp = llu_i2obdexp(group->lig_inode);
+        struct obd_export *exp = llu_i2dtexp(group->lig_inode);
         struct page *pages = &group->lig_pages[group->lig_npages];
         struct ll_async_page *llap = &group->lig_llap[group->lig_npages];
         int i, rc, npages = 0, ret_bytes = 0;
@@ -491,7 +491,7 @@ static
 void put_io_group(struct llu_io_group *group)
 {
         struct lov_stripe_md *lsm = llu_i2info(group->lig_inode)->lli_smd;
-        struct obd_export *exp = llu_i2obdexp(group->lig_inode);
+        struct obd_export *exp = llu_i2dtexp(group->lig_inode);
         struct ll_async_page *llap = group->lig_llap;
         int i;
 
@@ -535,7 +535,7 @@ ssize_t llu_file_prwv(const struct iovec *iovec, int iovlen,
          */
         liblustre_wait_event(0);
 
-        exp = llu_i2obdexp(inode);
+        exp = llu_i2dtexp(inode);
         if (exp == NULL)
                 RETURN(-EINVAL);
 
index 6976b38..211be83 100644 (file)
@@ -85,14 +85,14 @@ static int ll_permission(struct inode *inode, int mask)
 static void llu_fsop_gone(struct filesys *fs)
 {
         struct llu_sb_info *sbi = (struct llu_sb_info *) fs->fs_private;
-        struct obd_device *obd = class_exp2obd(sbi->ll_lmv_exp);
+        struct obd_device *obd = class_exp2obd(sbi->ll_md_exp);
         struct lustre_cfg lcfg;
         int next = 0;
         ENTRY;
 
         list_del(&sbi->ll_conn_chain);
-        obd_disconnect(sbi->ll_lov_exp, 0);
-        obd_disconnect(sbi->ll_lmv_exp, 0);
+        obd_disconnect(sbi->ll_dt_exp, 0);
+        obd_disconnect(sbi->ll_md_exp, 0);
 
         while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, &next)) != NULL)
         {
@@ -111,7 +111,7 @@ static void llu_fsop_gone(struct filesys *fs)
                 }
         }
 
-        obd_disconnect(sbi->ll_lmv_exp, 0);
+        obd_disconnect(sbi->ll_md_exp, 0);
         OBD_FREE(sbi, sizeof(*sbi));
         EXIT;
 }
@@ -139,13 +139,9 @@ void llu_update_inode(struct inode *inode, struct mds_body *body,
                 }
         }
 
-        /*
-         * updating inode lustre id. We try optimize things a little bit here,
-         * thus do not do it all the time.
-         */
-        if (body->valid & OBD_MD_FID)
-                id_assign_fid(&lli->lli_id, &body->id1);
-        if ((body->valid & OBD_MD_FLID) || (body->valid & OBD_MD_FLGENER))
+        id_assign_fid(&lli->lli_id, &body->id1);
+        
+       if ((body->valid & OBD_MD_FLID) || (body->valid & OBD_MD_FLGENER))
                 id_assign_stc(&lli->lli_id, &body->id1);
         if (body->valid & OBD_MD_FLID)
                 lli->lli_st_ino = id_ino(&body->id1);
@@ -287,7 +283,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, obd_valid valid)
 int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm)
 {
         struct llu_inode_info *lli = llu_i2info(inode);
-        struct obd_export *exp = llu_i2obdexp(inode);
+        struct obd_export *exp = llu_i2dtexp(inode);
         struct ptlrpc_request_set *set;
         struct obdo oa;
         obd_valid refresh_valid;
@@ -394,7 +390,7 @@ static int llu_have_md_lock(struct inode *inode, __u64 lockpart)
 
         LASSERT(inode);
 
-        obddev = sbi->ll_lmv_exp->exp_obd;
+        obddev = sbi->ll_md_exp->exp_obd;
         res_id.name[0] = id_fid(&lli->lli_id);
         res_id.name[1] = id_group(&lli->lli_id);
 
@@ -438,17 +434,17 @@ static int llu_inode_revalidate(struct inode *inode)
                 /* Why don't we update all valid MDS fields here, if we're doing
                  * an RPC anyways?  -phil */
                 if (S_ISREG(lli->lli_st_mode)) {
-                        ealen = obd_size_diskmd(sbi->ll_lov_exp, NULL);
+                        ealen = obd_size_diskmd(sbi->ll_dt_exp, NULL);
                         valid |= OBD_MD_FLEASIZE;
                 }
                 ll_inode2id(&id, inode);
-                rc = mdc_getattr(sbi->ll_lmv_exp, &id, valid, ealen, &req);
+                rc = mdc_getattr(sbi->ll_md_exp, &id, valid, ealen, &req);
                 if (rc) {
                         CERROR("failure %d inode %lu\n", rc, lli->lli_st_ino);
                         RETURN(-abs(rc));
                 }
-                rc = mdc_req2lustre_md(sbi->ll_lmv_exp, req, 0, 
-                                       sbi->ll_lov_exp, &md);
+                rc = mdc_req2lustre_md(sbi->ll_md_exp, req, 0, 
+                                       sbi->ll_dt_exp, &md);
 
                 /* XXX Too paranoid? */
                 if (((md.body->valid ^ valid) & OBD_MD_FLEASIZE) &&
@@ -467,7 +463,7 @@ static int llu_inode_revalidate(struct inode *inode)
 
                 llu_update_inode(inode, md.body, md.lsm);
                 if (md.lsm != NULL && llu_i2info(inode)->lli_smd != md.lsm)
-                        obd_free_memmd(sbi->ll_lov_exp, &md.lsm);
+                        obd_free_memmd(sbi->ll_dt_exp, &md.lsm);
 
                 if (md.body->valid & OBD_MD_FLSIZE)
                         set_bit(LLI_F_HAVE_MDS_SIZE_LOCK,
@@ -556,14 +552,14 @@ void llu_clear_inode(struct inode *inode)
 
         ll_inode2id(&id, inode);
         clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(lli->lli_flags));
-        mdc_change_cbdata(sbi->ll_lmv_exp, &id, null_if_equal, inode);
+        mdc_change_cbdata(sbi->ll_md_exp, &id, null_if_equal, inode);
 
         if (lli->lli_smd)
-                obd_change_cbdata(sbi->ll_lov_exp, lli->lli_smd,
+                obd_change_cbdata(sbi->ll_dt_exp, lli->lli_smd,
                                   null_if_equal, inode);
 
         if (lli->lli_smd) {
-                obd_free_memmd(sbi->ll_lov_exp, &lli->lli_smd);
+                obd_free_memmd(sbi->ll_dt_exp, &lli->lli_smd);
                 lli->lli_smd = NULL;
         }
 
@@ -684,7 +680,7 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
                 struct lustre_md md;
                 llu_prepare_mdc_data(&op_data, inode, NULL, NULL, 0, 0);
 
-                rc = mdc_setattr(sbi->ll_lmv_exp, &op_data,
+                rc = mdc_setattr(sbi->ll_md_exp, &op_data,
                                  attr, NULL, 0, NULL, 0, &request);
                 
                 if (rc) {
@@ -694,8 +690,8 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
                         RETURN(rc);
                 }
 
-                rc = mdc_req2lustre_md(sbi->ll_lmv_exp, request, 0, 
-                                       sbi->ll_lov_exp, &md);
+                rc = mdc_req2lustre_md(sbi->ll_md_exp, request, 0, 
+                                       sbi->ll_dt_exp, &md);
                 if (rc) {
                         ptlrpc_req_finished(request);
                         RETURN(rc);
@@ -772,7 +768,7 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
                 oa.o_valid = OBD_MD_FLID;
                 obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
                                             OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-                rc = obd_setattr(sbi->ll_lov_exp, &oa, lsm, NULL);
+                rc = obd_setattr(sbi->ll_dt_exp, &oa, lsm, NULL);
                 if (rc)
                         CERROR("obd_setattr fails: rc=%d\n", rc);
         }
@@ -845,7 +841,7 @@ static int llu_iop_symlink_raw(struct pnode *pno, const char *tgt)
                 RETURN(err);
 
         llu_prepare_mdc_data(&op_data, dir, NULL, name, len, 0);
-        err = mdc_create(sbi->ll_lmv_exp, &op_data,
+        err = mdc_create(sbi->ll_md_exp, &op_data,
                          tgt, strlen(tgt) + 1, S_IFLNK | S_IRWXUGO,
                          current->fsuid, current->fsgid, 0, &request);
         ptlrpc_req_finished(request);
@@ -872,7 +868,7 @@ static int llu_readlink_internal(struct inode *inode,
         }
 
         ll_inode2id(&id, inode);
-        rc = mdc_getattr(sbi->ll_lmv_exp, &id,
+        rc = mdc_getattr(sbi->ll_md_exp, &id,
                          OBD_MD_LINKNAME, symlen, request);
         if (rc) {
                 CERROR("inode %lu: rc = %d\n", lli->lli_st_ino, rc);
@@ -967,7 +963,7 @@ static int llu_iop_mknod_raw(struct pnode *pno,
                                      pno->p_base->pb_name.name,
                                      pno->p_base->pb_name.len,
                                      0);
-                err = mdc_create(sbi->ll_lmv_exp, &op_data, NULL, 0, mode,
+                err = mdc_create(sbi->ll_md_exp, &op_data, NULL, 0, mode,
                                  current->fsuid, current->fsgid, dev, &request);
                 ptlrpc_req_finished(request);
                 break;
@@ -996,7 +992,7 @@ static int llu_iop_link_raw(struct pnode *old, struct pnode *new)
 
         liblustre_wait_event(0);
         llu_prepare_mdc_data(&op_data, src, dir, name, namelen, 0);
-        rc = mdc_link(llu_i2sbi(src)->ll_lmv_exp, &op_data, &request);
+        rc = mdc_link(llu_i2sbi(src)->ll_md_exp, &op_data, &request);
         ptlrpc_req_finished(request);
         liblustre_wait_event(0);
 
@@ -1022,7 +1018,7 @@ static int llu_iop_unlink_raw(struct pnode *pno)
 
         liblustre_wait_event(0);
         llu_prepare_mdc_data(&op_data, dir, NULL, name, len, 0);
-        rc = mdc_unlink(llu_i2sbi(dir)->ll_lmv_exp, &op_data, &request);
+        rc = mdc_unlink(llu_i2sbi(dir)->ll_md_exp, &op_data, &request);
         if (!rc)
                 rc = llu_objects_destroy(request, dir);
         ptlrpc_req_finished(request);
@@ -1047,7 +1043,7 @@ static int llu_iop_rename_raw(struct pnode *old, struct pnode *new)
         LASSERT(tgt);
 
         llu_prepare_mdc_data(&op_data, src, tgt, NULL, 0, 0);
-        rc = mdc_rename(llu_i2sbi(src)->ll_lmv_exp, &op_data,
+        rc = mdc_rename(llu_i2sbi(src)->ll_md_exp, &op_data,
                         oldname, oldnamelen, newname, newnamelen,
                         &request);
         if (!rc) {
@@ -1068,7 +1064,7 @@ static int llu_statfs_internal(struct llu_sb_info *sbi,
         int rc;
         ENTRY;
 
-        rc = obd_statfs(class_exp2obd(sbi->ll_lmv_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);
@@ -1077,7 +1073,7 @@ static int llu_statfs_internal(struct llu_sb_info *sbi,
         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_lov_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);
@@ -1190,7 +1186,7 @@ static int llu_iop_mkdir_raw(struct pnode *pno, mode_t mode)
 
         mode = (mode & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR;
         llu_prepare_mdc_data(&op_data, dir, NULL, name, len, 0);
-        err = mdc_create(llu_i2sbi(dir)->ll_lmv_exp, &op_data, NULL, 0, mode,
+        err = mdc_create(llu_i2sbi(dir)->ll_md_exp, &op_data, NULL, 0, mode,
                          current->fsuid, current->fsgid, 0, &request);
         ptlrpc_req_finished(request);
         RETURN(err);
@@ -1211,7 +1207,7 @@ static int llu_iop_rmdir_raw(struct pnode *pno)
                name, lli->lli_st_ino, lli->lli_st_generation, dir);
 
         llu_prepare_mdc_data(&op_data, dir, NULL, name, len, S_IFDIR);
-        rc = mdc_unlink(llu_i2sbi(dir)->ll_lmv_exp, &op_data, &request);
+        rc = mdc_unlink(llu_i2sbi(dir)->ll_md_exp, &op_data, &request);
         ptlrpc_req_finished(request);
 
         RETURN(rc);
@@ -1490,7 +1486,7 @@ llu_fsswop_mount(const char *source,
                 CERROR("cannot connect to %s: rc = %d\n", lmv, err);
                 GOTO(out_free, err);
         }
-        sbi->ll_lmv_exp = class_conn2export(&lmv_conn);
+        sbi->ll_md_exp = class_conn2export(&lmv_conn);
 
         err = obd_statfs(obd, &osfs, 100000000);
         if (err)
@@ -1514,9 +1510,9 @@ llu_fsswop_mount(const char *source,
                 CERROR("cannot connect to %s: rc = %d\n", lov, err);
                 GOTO(out_lmv, err);
         }
-        sbi->ll_lov_exp = class_conn2export(&lov_conn);
+        sbi->ll_dt_exp = class_conn2export(&lov_conn);
 
-        err = mdc_getstatus(sbi->ll_lmv_exp, &rootid);
+        err = mdc_getstatus(sbi->ll_md_exp, &rootid);
         if (err) {
                 CERROR("cannot mds_connect: rc = %d\n", err);
                 GOTO(out_lov, err);
@@ -1525,15 +1521,15 @@ llu_fsswop_mount(const char *source,
         sbi->ll_rootino = rootid.li_stc.u.e3s.l3s_ino;
 
         /* fetch attr of root inode */
-        err = mdc_getattr(sbi->ll_lmv_exp, &rootid,
+        err = mdc_getattr(sbi->ll_md_exp, &rootid,
                           OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS, 0, &request);
         if (err) {
                 CERROR("mdc_getattr failed for root: rc = %d\n", err);
                 GOTO(out_lov, err);
         }
 
-        err = mdc_req2lustre_md(sbi->ll_lmv_exp, request, 0, 
-                                sbi->ll_lov_exp, &md);
+        err = mdc_req2lustre_md(sbi->ll_md_exp, request, 0, 
+                                sbi->ll_dt_exp, &md);
         if (err) {
                 CERROR("failed to understand root inode md: rc = %d\n",err);
                 GOTO(out_request, err);
@@ -1573,9 +1569,9 @@ out_inode:
 out_request:
         ptlrpc_req_finished(request);
 out_lov:
-        obd_disconnect(sbi->ll_lov_exp, 0);
+        obd_disconnect(sbi->ll_dt_exp, 0);
 out_lmv:
-        obd_disconnect(sbi->ll_lmv_exp, 0);
+        obd_disconnect(sbi->ll_md_exp, 0);
 out_free:
         OBD_FREE(sbi, sizeof(*sbi));
         return err;
index fad03f2..2d5a7c8 100644 (file)
@@ -169,7 +169,7 @@ int revalidate_it_finish(struct ptlrpc_request *request, int offset,
                 RETURN(-ENOENT);
 
         sbi = ll_i2sbi(de->d_inode);
-        rc = ll_prep_inode(sbi->ll_lov_exp, sbi->ll_lmv_exp,
+        rc = ll_prep_inode(sbi->ll_dt_exp, sbi->ll_md_exp,
                            &de->d_inode, request, offset, NULL);
 
         RETURN(rc);
@@ -244,7 +244,7 @@ int ll_revalidate_it(struct dentry *de, int flags, struct nameidata *nd,
                (unsigned long) de->d_inode->i_ino,
                (unsigned long) de->d_inode->i_generation);
 
-        exp = ll_i2lmvexp(de->d_inode);
+        exp = ll_i2mdexp(de->d_inode);
         ll_inode2id(&pid, de->d_parent->d_inode);
         ll_inode2id(&cid, de->d_inode);
         LASSERT(id_fid(&cid) != 0);
@@ -372,7 +372,7 @@ out:
         unlock_kernel();
 
         handle = (flag) ? &ldd->lld_mnt_och : &ldd->lld_cwd_och;
-        rc = obd_pin(sbi->ll_lmv_exp, inode->i_ino, inode->i_generation,
+        rc = obd_pin(sbi->ll_md_exp, inode->i_ino, inode->i_generation,
                      inode->i_mode & S_IFMT, handle, flag);
 
         if (rc) {
@@ -422,7 +422,7 @@ out:
                 return;
         }
 
-        rc = obd_unpin(sbi->ll_lmv_exp, &handle, flag);
+        rc = obd_unpin(sbi->ll_md_exp, &handle, flag);
         EXIT;
 }
 
@@ -450,7 +450,7 @@ static void ll_dentry_iput(struct dentry *dentry, struct inode *inode)
         LASSERT(dentry->d_parent && dentry->d_parent->d_inode);
         ll_inode2id(&parent, dentry->d_parent->d_inode);
         ll_inode2id(&child, inode);
-        md_change_cbdata_name(sbi->ll_lmv_exp, &parent,
+        md_change_cbdata_name(sbi->ll_md_exp, &parent,
                               (char *)dentry->d_name.name, 
                               dentry->d_name.len, &child, 
                               null_if_equal, inode);
@@ -465,7 +465,7 @@ static void ll_dentry_iput(struct dentry *dentry, struct inode *inode)
         LASSERT(dentry->d_parent && dentry->d_parent->d_inode);
         ll_inode2id(&parent, dentry->d_parent->d_inode);
         ll_inode2id(&child, inode);
-        md_change_cbdata_name(sbi->ll_lmv_exp, &parent,
+        md_change_cbdata_name(sbi->ll_md_exp, &parent,
                               (char *)dentry->d_name.name, 
                               dentry->d_name.len, &child, 
                               null_if_equal, inode);
index d8ec0d1..eae5276 100644 (file)
@@ -76,7 +76,7 @@ static int ll_dir_readpage(struct file *file, struct page *page)
                     id_fid(&ll_i2info(inode)->lli_id));
 
         offset = page->index << PAGE_SHIFT;
-        rc = md_readpage(ll_i2sbi(inode)->ll_lmv_exp, &id, offset,
+        rc = md_readpage(ll_i2sbi(inode)->ll_md_exp, &id, offset,
                          page, &request);
         if (!rc) {
                 body = lustre_msg_buf(request->rq_repmsg, 0, sizeof(*body));
@@ -212,13 +212,13 @@ static struct page *ll_get_dir_page(struct inode *dir, unsigned long n)
         struct ldlm_res_id res_id =
                 { .name = { id_fid(&li->lli_id), id_group(&li->lli_id)} };
         struct lustre_handle lockh;
-        struct obd_device *obddev = class_exp2obd(ll_i2sbi(dir)->ll_lmv_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 } };
         int rc;
 
-        obddev = md_get_real_obd(ll_i2sbi(dir)->ll_lmv_exp, NULL, 0);
+        obddev = md_get_real_obd(ll_i2sbi(dir)->ll_md_exp, NULL, 0);
         rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED,
                              &res_id, LDLM_IBITS, &policy, LCK_PR, &lockh);
         if (!rc) {
@@ -232,7 +232,7 @@ static struct page *ll_get_dir_page(struct inode *dir, unsigned long n)
 
                 ll_prepare_mdc_data(op_data, dir, NULL, NULL, 0, 0);
 
-                rc = md_enqueue(ll_i2sbi(dir)->ll_lmv_exp, LDLM_IBITS, &it,
+                rc = md_enqueue(ll_i2sbi(dir)->ll_md_exp, LDLM_IBITS, &it,
                                 LCK_PR, op_data, &lockh, NULL, 0,
                                 ldlm_completion_ast, ll_mdc_blocking_ast, dir);
                 OBD_FREE(op_data, sizeof(*op_data));
@@ -412,7 +412,7 @@ static int ll_mkdir_stripe(struct inode *inode, unsigned long arg)
         if (op_data == NULL)
                 GOTO(out, err = -ENOMEM);
         ll_prepare_mdc_data(op_data, inode, NULL, name,lums.lums_namelen,0);
-        err = md_create(sbi->ll_lmv_exp, op_data, &nstripes, sizeof(nstripes),
+        err = md_create(sbi->ll_md_exp, op_data, &nstripes, sizeof(nstripes),
                         mode, current->fsuid, current->fsgid, 0, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         ptlrpc_req_finished(request);
@@ -463,7 +463,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
 
                 valid = OBD_MD_FLID;
                 ll_inode2id(&id, inode);
-                rc = md_getattr_lock(sbi->ll_lmv_exp, &id,
+                rc = md_getattr_lock(sbi->ll_md_exp, &id,
                                      filename, namelen, valid, 0, &request);
                 if (rc < 0) {
                         CDEBUG(D_INFO, "md_getattr_lock: %d\n", rc);
@@ -504,7 +504,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 
                 ll_prepare_mdc_data(op_data, inode, NULL, NULL, 0, 0);
 
-                rc = md_setattr(sbi->ll_lmv_exp, op_data, &attr, &lum,
+                rc = md_setattr(sbi->ll_md_exp, op_data, &attr, &lum,
                                 sizeof(lum), NULL, 0, &request);
                 OBD_FREE(op_data, sizeof(*op_data));
                 ptlrpc_req_finished(request);
@@ -527,8 +527,8 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 valid |= OBD_MD_FLDIREA;
 
                 ll_inode2id(&id, inode);
-                rc = md_getattr(sbi->ll_lmv_exp, &id, valid,
-                                obd_size_diskmd(sbi->ll_lov_exp, NULL),
+                rc = md_getattr(sbi->ll_md_exp, &id, valid,
+                                obd_size_diskmd(sbi->ll_dt_exp, NULL),
                                 &request);
                 if (rc < 0) {
                         CDEBUG(D_INFO, "md_getattr failed: rc = %d\n", rc);
@@ -567,7 +567,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
 
                 ll_inode2id(&id, inode);
 
-                rc = ll_get_fid(sbi->ll_lmv_exp, &id, filename, &id);
+                rc = ll_get_fid(sbi->ll_md_exp, &id, filename, &id);
                 if (rc < 0)
                         GOTO(out_filename, rc);
 
@@ -594,9 +594,9 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                         RETURN(PTR_ERR(filename));
 
                 ll_inode2id(&id, inode);
-                rc = md_getattr_lock(sbi->ll_lmv_exp, &id, filename,
+                rc = md_getattr_lock(sbi->ll_md_exp, &id, filename,
                                      strlen(filename) + 1, OBD_MD_FLEASIZE,
-                                     obd_size_diskmd(sbi->ll_lov_exp, NULL),
+                                     obd_size_diskmd(sbi->ll_dt_exp, NULL),
                                      &request);
                 if (rc < 0) {
                         CDEBUG(D_INFO, "md_getattr_lock failed on %s: rc %d\n",
@@ -699,7 +699,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                         bufs[1] = NULL;
                 }
                 size = data->ioc_plen1;
-                req = ptlrpc_prep_req(sbi2lmv(sbi)->cl_import,
+                req = ptlrpc_prep_req(sbi2md(sbi)->cl_import,
                                       LUSTRE_LOG_VERSION, LLOG_CATINFO,
                                       2, lens, bufs);
                 if (!req)
@@ -718,7 +718,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 RETURN(rc);
         }
         default:
-                return obd_iocontrol(cmd, sbi->ll_lov_exp, 0,
+                return obd_iocontrol(cmd, sbi->ll_dt_exp, 0,
                                      NULL, (void *)arg);
         }
 }
index f333731..cf0ee8d 100644 (file)
@@ -33,8 +33,8 @@
 #include "llite_internal.h"
 #include <linux/obd_lov.h>
 
-int ll_mdc_close(struct obd_export *lmv_exp, struct inode *inode,
-                 struct file *file)
+int ll_md_close(struct obd_export *md_exp, struct inode *inode,
+                struct file *file)
 {
         struct ll_file_data *fd = file->private_data;
         struct ptlrpc_request *req = NULL;
@@ -66,7 +66,7 @@ int ll_mdc_close(struct obd_export *lmv_exp, struct inode *inode,
                 obdo->o_valid |= OBD_MD_FLFLAGS;
         }
         obdo->o_mds = id_group(&ll_i2info(inode)->lli_id);
-        rc = md_close(lmv_exp, obdo, och, &req);
+        rc = md_close(md_exp, obdo, och, &req);
         obdo_free(obdo);
 
         if (rc == EAGAIN) {
@@ -85,7 +85,7 @@ int ll_mdc_close(struct obd_export *lmv_exp, struct inode *inode,
                                inode->i_ino, rc);
         }
 
-        mdc_clear_open_replay_data(lmv_exp, och);
+        mdc_clear_open_replay_data(md_exp, och);
         ptlrpc_req_finished(req);
         och->och_fh.cookie = DEAD_HANDLE_MAGIC;
         file->private_data = NULL;
@@ -116,7 +116,7 @@ int ll_file_release(struct inode *inode, struct file *file)
         fd = (struct ll_file_data *)file->private_data;
         LASSERT(fd != NULL);
 
-        rc = ll_mdc_close(sbi->ll_lmv_exp, inode, file);
+        rc = ll_md_close(sbi->ll_md_exp, inode, file);
         RETURN(rc);
 }
 
@@ -139,7 +139,7 @@ static int ll_intent_file_open(struct file *file, void *lmm,
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, parent->d_inode, NULL, name, len, O_RDWR);
 
-        rc = md_enqueue(sbi->ll_lmv_exp, LDLM_IBITS, itp, LCK_PR, op_data,
+        rc = md_enqueue(sbi->ll_md_exp, LDLM_IBITS, itp, LCK_PR, op_data,
                         &lockh, lmm, lmmsize, ldlm_completion_ast,
                         ll_mdc_blocking_ast, NULL);
         OBD_FREE(op_data, sizeof(*op_data));
@@ -158,7 +158,7 @@ int ll_local_open(struct file *file, struct lookup_intent *it)
 {
         struct ptlrpc_request *req = it->d.lustre.it_data;
         struct ll_inode_info *lli = ll_i2info(file->f_dentry->d_inode);
-        struct obd_export *lmv_exp = ll_i2lmvexp(file->f_dentry->d_inode);
+        struct obd_export *md_exp = ll_i2mdexp(file->f_dentry->d_inode);
         struct ll_file_data *fd;
         struct mds_body *body;
         ENTRY;
@@ -179,7 +179,7 @@ int ll_local_open(struct file *file, struct lookup_intent *it)
         OBD_SLAB_ALLOC(fd, ll_file_data_slab, SLAB_KERNEL, sizeof *fd);
         
         /* We can't handle this well without reorganizing ll_file_open and
-         * ll_mdc_close, so don't even try right now. */
+         * ll_md_close(), so don't even try right now. */
         LASSERT(fd != NULL);
 
         memcpy(&fd->fd_mds_och.och_fh, &body->handle, sizeof(body->handle));
@@ -189,7 +189,7 @@ int ll_local_open(struct file *file, struct lookup_intent *it)
 
         lli->lli_io_epoch = body->io_epoch;
 
-        mdc_set_open_replay_data(lmv_exp, &fd->fd_mds_och, it->d.lustre.it_data);
+        mdc_set_open_replay_data(md_exp, &fd->fd_mds_och, it->d.lustre.it_data);
 
         RETURN(0);
 }
@@ -321,7 +321,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;
@@ -686,7 +686,7 @@ int ll_glimpse_size(struct inode *inode)
 
         CDEBUG(D_DLMTRACE, "Glimpsing inode %lu\n", inode->i_ino);
 
-        rc = obd_enqueue(sbi->ll_lov_exp, lli->lli_smd, LDLM_EXTENT, &policy,
+        rc = obd_enqueue(sbi->ll_dt_exp, lli->lli_smd, LDLM_EXTENT, &policy,
                          LCK_PR, &flags, ll_extent_lock_callback,
                          ldlm_completion_ast, ll_glimpse_callback, inode,
                          sizeof(struct ost_lvb), lustre_swab_ost_lvb, &lockh);
@@ -704,7 +704,7 @@ int ll_glimpse_size(struct inode *inode)
 
         CDEBUG(D_DLMTRACE, "glimpse: size: "LPU64", blocks: "LPU64"\n",
                (__u64)inode->i_size, (__u64)inode->i_blocks);
-        obd_cancel(sbi->ll_lov_exp, lli->lli_smd, LCK_PR, &lockh);
+        obd_cancel(sbi->ll_dt_exp, lli->lli_smd, LCK_PR, &lockh);
         RETURN(rc);
 }
 
@@ -740,7 +740,7 @@ int ll_extent_lock(struct ll_file_data *fd, struct inode *inode,
                inode->i_ino, policy->l_extent.start, policy->l_extent.end);
 
         do_gettimeofday(&start);
-        rc = obd_enqueue(sbi->ll_lov_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);
@@ -781,7 +781,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_lov_exp, lsm, mode, lockh);
+        rc = obd_cancel(sbi->ll_dt_exp, lsm, mode, lockh);
 
         RETURN(rc);
 }
@@ -928,7 +928,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;
@@ -986,7 +986,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;
-        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;
@@ -1021,7 +1021,7 @@ static int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
         if (rc < 0)
                 GOTO(out, rc);
 
-        rc = mdc_req2lustre_md(ll_i2lmvexp(inode), req, 1, exp, &md);
+        rc = mdc_req2lustre_md(ll_i2mdexp(inode), req, 1, exp, &md);
         if (rc)
                 GOTO(out, rc);
         ll_update_inode(f->f_dentry->d_inode, &md);
@@ -1089,7 +1089,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);
@@ -1102,7 +1102,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);
 }
 
@@ -1216,7 +1216,7 @@ int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 
                 ll_inode2id(&id, inode);
 
-                rc = ll_get_fid(sbi->ll_lmv_exp, &id, filename, &id);
+                rc = ll_get_fid(sbi->ll_md_exp, &id, filename, &id);
                 if (rc < 0)
                         GOTO(out_filename, rc);
 
@@ -1254,7 +1254,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) );
         }
 }
@@ -1324,7 +1324,7 @@ int ll_fsync(struct file *file, struct dentry *dentry, int data)
         rc = filemap_fdatawait(inode->i_mapping);
 
         ll_inode2id(&id, inode);
-        err = md_sync(ll_i2sbi(inode)->ll_lmv_exp, &id, &req);
+        err = md_sync(ll_i2sbi(inode)->ll_md_exp, &id, &req);
         if (!rc)
                 rc = err;
         if (!err)
@@ -1343,7 +1343,7 @@ int ll_fsync(struct file *file, struct dentry *dentry, int data)
                                             OBD_MD_FLMTIME | OBD_MD_FLCTIME |
                                             OBD_MD_FLGROUP));
 
-                err = obd_sync(ll_i2sbi(inode)->ll_lov_exp, oa, lsm,
+                err = obd_sync(ll_i2sbi(inode)->ll_dt_exp, oa, lsm,
                                0, OBD_OBJECT_EOF);
                 if (!rc)
                         rc = err;
@@ -1429,7 +1429,7 @@ 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 = md_get_real_obd(sbi->ll_lmv_exp, NULL, 0);
+        obddev = md_get_real_obd(sbi->ll_md_exp, NULL, 0);
         rc = ldlm_cli_enqueue(obddev->obd_self_export, NULL,
                               obddev->obd_namespace,
                               res_id, LDLM_FLOCK, &flock, mode, &flags,
@@ -1470,7 +1470,7 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it)
         lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, LPROC_LL_REVALIDATE);
 #endif
 
-        rc = md_intent_lock(sbi->ll_lmv_exp, &id, NULL, 0, NULL, 0, &id,
+        rc = md_intent_lock(sbi->ll_md_exp, &id, NULL, 0, NULL, 0, &id,
                             &oit, 0, &req, ll_mdc_blocking_ast);
         if (rc < 0)
                 GOTO(out, rc);
index bfaa156..61858c5 100644 (file)
@@ -148,7 +148,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,
index 781d122..2dd8aae 100644 (file)
@@ -40,10 +40,9 @@ struct ll_sb_info {
         spinlock_t                ll_lock;
         
         struct obd_uuid           ll_sb_uuid;
-        struct obd_export        *ll_lmv_exp;
-        struct lmv_desc           ll_lmv_desc;
-        struct obd_export        *ll_lov_exp;
-        struct lov_desc           ll_lov_desc;
+        struct obd_export        *ll_md_exp;
+        struct obd_export        *ll_dt_exp;
+        struct lov_desc           ll_dt_desc;
         struct proc_dir_entry    *ll_proc_root;
         struct lustre_id          ll_rootid;     /* root lustre id */
 
@@ -206,7 +205,7 @@ int ll_file_release(struct inode *inode, struct file *file);
 int ll_lsm_getattr(struct obd_export *, struct lov_stripe_md *, struct obdo *);
 int ll_glimpse_size(struct inode *inode);
 int ll_local_open(struct file *file, struct lookup_intent *it);
-int ll_mdc_close(struct obd_export *lmv_exp, struct inode *inode,
+int ll_md_close(struct obd_export *md_exp, struct inode *inode,
                  struct file *file);
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 int ll_getattr(struct vfsmount *mnt, struct dentry *de,
@@ -352,20 +351,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_lov_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_s2lmvexp(struct super_block *sb)
+static inline struct obd_export *ll_s2mdexp(struct super_block *sb)
 {
-        return ll_s2sbi(sb)->ll_lmv_exp;
+        return ll_s2sbi(sb)->ll_md_exp;
 }
 
-static inline struct client_obd *sbi2lmv(struct ll_sb_info *sbi)
+static inline struct client_obd *sbi2md(struct ll_sb_info *sbi)
 {
-        struct obd_device *obd = sbi->ll_lmv_exp->exp_obd;
+        struct obd_device *obd = sbi->ll_md_exp->exp_obd;
         if (obd == NULL)
                 LBUG();
         return &obd->u.cli;
@@ -377,19 +376,19 @@ 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_i2lmvexp(struct inode *inode)
+static inline struct obd_export *ll_i2mdexp(struct inode *inode)
 {
-        return ll_s2lmvexp(inode->i_sb);
+        return ll_s2mdexp(inode->i_sb);
 }
 
 static inline int ll_mds_max_easize(struct super_block *sb)
 {
-        return sbi2lmv(ll_s2sbi(sb))->cl_max_mds_easize;
+        return sbi2md(ll_s2sbi(sb))->cl_max_mds_easize;
 }
 
 static inline __u64 ll_file_maxbytes(struct inode *inode)
index 961f491..bef852f 100644 (file)
@@ -92,27 +92,15 @@ void lustre_free_sbi(struct super_block *sb)
         EXIT;
 }
 
-int lustre_init_lov_desc(struct ll_sb_info *sbi)
+int lustre_init_dt_desc(struct ll_sb_info *sbi)
 {
         int valsize, rc;
         ENTRY;
         
-        valsize = sizeof(sbi->ll_lov_desc);
-        memset(&sbi->ll_lov_desc, 0, sizeof(sbi->ll_lov_desc));
-        rc = obd_get_info(sbi->ll_lov_exp, strlen("lovdesc") + 1,
-                          "lovdesc", &valsize, &sbi->ll_lov_desc);
-        RETURN(rc);
-}
-
-int lustre_init_lmv_desc(struct ll_sb_info *sbi)
-{
-        int valsize, rc;
-        ENTRY;
-        
-        valsize = sizeof(sbi->ll_lmv_desc);
-        memset(&sbi->ll_lmv_desc, 0, sizeof(sbi->ll_lmv_desc));
-        rc = obd_get_info(sbi->ll_lmv_exp, strlen("lmvdesc") + 1,
-                          "lmvdesc", &valsize, &sbi->ll_lmv_desc);
+        valsize = sizeof(sbi->ll_dt_desc);
+        memset(&sbi->ll_dt_desc, 0, sizeof(sbi->ll_dt_desc));
+        rc = obd_get_info(sbi->ll_dt_exp, strlen("lovdesc") + 1,
+                          "lovdesc", &valsize, &sbi->ll_dt_desc);
         RETURN(rc);
 }
 
@@ -120,8 +108,8 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
 {
         struct ll_sb_info *sbi = ll_s2sbi(sb);
         struct ptlrpc_request *request = NULL;
-        struct lustre_handle lov_conn = {0, };
-        struct lustre_handle lmv_conn = {0, };
+        struct lustre_handle dt_conn = {0, };
+        struct lustre_handle md_conn = {0, };
         struct inode *root = NULL;
         struct obd_device *obd;
         struct obd_statfs osfs;
@@ -143,7 +131,7 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
                         CERROR("could not register mount in /proc/lustre");
         }
 
-        err = obd_connect(&lmv_conn, obd, &sbi->ll_sb_uuid, OBD_OPT_REAL_CLIENT);
+        err = obd_connect(&md_conn, obd, &sbi->ll_sb_uuid, OBD_OPT_REAL_CLIENT);
         if (err == -EBUSY) {
                 CERROR("An MDS (mdc %s) is performing recovery, of which this"
                        " client is not a part.  Please wait for recovery to "
@@ -153,10 +141,7 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
                 CERROR("cannot connect to %s: rc = %d\n", lmv, err);
                 GOTO(out, err);
         }
-        sbi->ll_lmv_exp = class_conn2export(&lmv_conn);
-
-        lustre_init_lmv_desc(sbi);
-        
+        sbi->ll_md_exp = class_conn2export(&md_conn);
         err = obd_statfs(obd, &osfs, jiffies - HZ);
         if (err)
                 GOTO(out_lmv, err);
@@ -171,8 +156,8 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
         sb->s_blocksize_bits = log2(osfs.os_bsize);
         sb->s_maxbytes = PAGE_CACHE_MAXBYTES;
        
-        devno = get_uuid2int(sbi->ll_lmv_exp->exp_obd->obd_uuid.uuid, 
-                             strlen(sbi->ll_lmv_exp->exp_obd->obd_uuid.uuid));
+        devno = get_uuid2int(sbi->ll_md_exp->exp_obd->obd_uuid.uuid, 
+                             strlen(sbi->ll_md_exp->exp_obd->obd_uuid.uuid));
 
         sb->s_dev = devno;
 
@@ -182,7 +167,7 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
                 GOTO(out_lmv, err);
         }
 
-        err = obd_connect(&lov_conn, obd, &sbi->ll_sb_uuid, OBD_OPT_REAL_CLIENT);
+        err = obd_connect(&dt_conn, obd, &sbi->ll_sb_uuid, OBD_OPT_REAL_CLIENT);
         if (err == -EBUSY) {
                 CERROR("An OST (osc %s) is performing recovery, of which this"
                        " client is not a part.  Please wait for recovery to "
@@ -192,17 +177,17 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
                 CERROR("cannot connect to %s: rc = %d\n", lov, err);
                 GOTO(out_lmv, err);
         }
-        sbi->ll_lov_exp = class_conn2export(&lov_conn);
+        sbi->ll_dt_exp = class_conn2export(&dt_conn);
 
-        err = lustre_init_lov_desc(sbi);
+        err = lustre_init_dt_desc(sbi);
         if (err == 0) {
-                int mdsize = obd_size_diskmd(sbi->ll_lov_exp, NULL);
-                obd_init_ea_size(sbi->ll_lmv_exp, mdsize,
-                                 sbi->ll_lov_desc.ld_tgt_count *
+                int mdsize = obd_size_diskmd(sbi->ll_dt_exp, NULL);
+                obd_init_ea_size(sbi->ll_md_exp, mdsize,
+                                 sbi->ll_dt_desc.ld_tgt_count *
                                  sizeof(struct llog_cookie));
         }
         
-        err = md_getstatus(sbi->ll_lmv_exp, &sbi->ll_rootid);
+        err = md_getstatus(sbi->ll_md_exp, &sbi->ll_rootid);
         if (err) {
                 CERROR("cannot mds_connect: rc = %d\n", err);
                 GOTO(out_lov, err);
@@ -213,16 +198,16 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
 
         /* make root inode
          * XXX: move this to after cbd setup? */
-        err = md_getattr(sbi->ll_lmv_exp, &sbi->ll_rootid,
-                         OBD_MD_FLNOTOBD | OBD_MD_FLBLOCKS | OBD_MD_FID,
+        err = md_getattr(sbi->ll_md_exp, &sbi->ll_rootid,
+                         OBD_MD_FLNOTOBD | OBD_MD_FLBLOCKS,
                          0, &request);
         if (err) {
                 CERROR("md_getattr failed for root: rc = %d\n", err);
                 GOTO(out_lov, err);
         }
 
-        err = mdc_req2lustre_md(sbi->ll_lmv_exp, request, 0, 
-                                sbi->ll_lov_exp, &md);
+        err = mdc_req2lustre_md(sbi->ll_md_exp, request, 0, 
+                                sbi->ll_dt_exp, &md);
         if (err) {
                 CERROR("failed to understand root inode md: rc = %d\n", err);
                 ptlrpc_req_finished(request);
@@ -267,9 +252,9 @@ out_root:
         if (root)
                 iput(root);
 out_lov:
-        obd_disconnect(sbi->ll_lov_exp, 0);
+        obd_disconnect(sbi->ll_dt_exp, 0);
 out_lmv:
-        obd_disconnect(sbi->ll_lmv_exp, 0);
+        obd_disconnect(sbi->ll_md_exp, 0);
 out:
         lprocfs_unregister_mountpoint(sbi);
         return err;
@@ -285,7 +270,7 @@ void lustre_common_put_super(struct super_block *sb)
         ll_close_thread_shutdown(sbi->ll_lcq);
 
         list_del(&sbi->ll_conn_chain);
-        obd_disconnect(sbi->ll_lov_exp, 0);
+        obd_disconnect(sbi->ll_dt_exp, 0);
 
         lprocfs_unregister_mountpoint(sbi);
         if (sbi->ll_proc_root) {
@@ -293,7 +278,7 @@ void lustre_common_put_super(struct super_block *sb)
                 sbi->ll_proc_root = NULL;
         }
 
-        obd_disconnect(sbi->ll_lmv_exp, 0);
+        obd_disconnect(sbi->ll_md_exp, 0);
 
         // We do this to get rid of orphaned dentries. That is not really trw.
         spin_lock(&dcache_lock);
@@ -435,7 +420,7 @@ static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
         struct portals_cfg pcfg;
         char *peer = "MDS_PEER_UUID";
         struct obd_device *obd;
-        struct lustre_handle lmv_conn = {0, };
+        struct lustre_handle md_conn = {0, };
         struct obd_export *exp;
         char *name = "mdc_dev";
         class_uuid_t uuid;
@@ -512,13 +497,13 @@ static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
         if (err)
                 GOTO(out_cleanup, err);
 
-        err = obd_connect(&lmv_conn, obd, &lmv_uuid, 0);
+        err = obd_connect(&md_conn, obd, &lmv_uuid, 0);
         if (err) {
                 CERROR("cannot connect to %s: rc = %d\n", lmd->lmd_mds, err);
                 GOTO(out_cleanup, err);
         }
 
-        exp = class_conn2export(&lmv_conn);
+        exp = class_conn2export(&md_conn);
 
         ctxt = llog_get_context(&exp->exp_obd->obd_llogs,LLOG_CONFIG_REPL_CTXT);
         rc = class_config_process_llog(ctxt, profile, cfg);
@@ -721,7 +706,7 @@ void lustre_put_super(struct super_block *sb)
         ENTRY;
 
         CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb);
-        obd = class_exp2obd(sbi->ll_lmv_exp);
+        obd = class_exp2obd(sbi->ll_md_exp);
         if (obd)
                 force_umount = obd->obd_no_recov;
         obd = NULL;
@@ -765,7 +750,7 @@ void lustre_put_super(struct super_block *sb)
 
 int ll_process_config_update(struct ll_sb_info *sbi, int clean)
 {
-        struct obd_export *lmv_exp = sbi->ll_lmv_exp;
+        struct obd_export *md_exp = sbi->ll_md_exp;
         struct lustre_mount_data *lmd = sbi->ll_lmd;
         struct llog_ctxt *ctxt;
         struct config_llog_instance cfg;
@@ -781,12 +766,12 @@ int ll_process_config_update(struct ll_sb_info *sbi, int clean)
                 RETURN(0);
         }
 
-        rc = ldlm_cli_cancel_unused(lmv_exp->exp_obd->obd_namespace, NULL,
+        rc = ldlm_cli_cancel_unused(md_exp->exp_obd->obd_namespace, NULL,
                                     LDLM_FL_CONFIG_CHANGE, NULL);
         if (rc != 0)
                 CWARN("ldlm_cli_cancel_unused(mdc): %d\n", rc);
 
-        rc = obd_cancel_unused(sbi->ll_lov_exp, NULL, LDLM_FL_CONFIG_CHANGE,
+        rc = obd_cancel_unused(sbi->ll_dt_exp, NULL, LDLM_FL_CONFIG_CHANGE,
                                NULL);
         if (rc != 0)
                 CWARN("obd_cancel_unused(lov): %d\n", rc);
@@ -810,7 +795,7 @@ int ll_process_config_update(struct ll_sb_info *sbi, int clean)
 
         CWARN("Applying configuration log %s\n", name);
 
-        ctxt = llog_get_context(&lmv_exp->exp_obd->obd_llogs,
+        ctxt = llog_get_context(&md_exp->exp_obd->obd_llogs,
                                 LLOG_CONFIG_REPL_CTXT);
         rc = class_config_process_llog(ctxt, name, &cfg);
         if (rc == 0)
@@ -821,11 +806,11 @@ int ll_process_config_update(struct ll_sb_info *sbi, int clean)
                 struct lov_desc desc;
                 int rc, valsize;
                 valsize = sizeof(desc);
-                rc = obd_get_info(sbi->ll_lov_exp, strlen("lovdesc") + 1,
+                rc = obd_get_info(sbi->ll_dt_exp, strlen("lovdesc") + 1,
                                   "lovdesc", &valsize, &desc);
 
-                rc = obd_init_ea_size(lmv_exp,
-                                      obd_size_diskmd(sbi->ll_lov_exp, NULL),
+                rc = obd_init_ea_size(md_exp,
+                                      obd_size_diskmd(sbi->ll_dt_exp, NULL),
                                       (desc.ld_tgt_count *
                                        sizeof(struct llog_cookie)));
         }
@@ -876,19 +861,19 @@ void ll_clear_inode(struct inode *inode)
         ll_inode2id(&id, inode);
         
         clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(ll_i2info(inode)->lli_flags));
-        md_change_cbdata(sbi->ll_lmv_exp, &id, null_if_equal, inode);
+        md_change_cbdata(sbi->ll_md_exp, &id, null_if_equal, inode);
 
         if (lli->lli_smd)
-                obd_change_cbdata(sbi->ll_lov_exp, lli->lli_smd,
+                obd_change_cbdata(sbi->ll_dt_exp, lli->lli_smd,
                                   null_if_equal, inode);
 
         if (lli->lli_smd) {
-                obd_free_memmd(sbi->ll_lov_exp, &lli->lli_smd);
+                obd_free_memmd(sbi->ll_dt_exp, &lli->lli_smd);
                 lli->lli_smd = NULL;
         }
 
         if (lli->lli_mea) {
-                obd_free_memmd(sbi->ll_lmv_exp,
+                obd_free_memmd(sbi->ll_md_exp,
                                (struct lov_stripe_md **) &lli->lli_mea);
                 lli->lli_mea = NULL;
         }
@@ -976,7 +961,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr)
                         RETURN(-ENOMEM);
                 ll_prepare_mdc_data(op_data, inode, NULL, NULL, 0, 0);
 
-                rc = md_setattr(sbi->ll_lmv_exp, op_data,
+                rc = md_setattr(sbi->ll_md_exp, op_data,
                                 attr, NULL, 0, NULL, 0, &request);
                 OBD_FREE(op_data, sizeof(*op_data));
                 if (rc) {
@@ -986,8 +971,8 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr)
                         RETURN(rc);
                 }
 
-                rc = mdc_req2lustre_md(sbi->ll_lmv_exp, request, 0, 
-                                       sbi->ll_lov_exp, &md);
+                rc = mdc_req2lustre_md(sbi->ll_md_exp, request, 0, 
+                                       sbi->ll_dt_exp, &md);
                 if (rc) {
                         ptlrpc_req_finished(request);
                         RETURN(rc);
@@ -1081,7 +1066,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr)
                 oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
                 obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
                                 OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-                rc = obd_setattr(sbi->ll_lov_exp, oa, lsm, NULL);
+                rc = obd_setattr(sbi->ll_dt_exp, oa, lsm, NULL);
                 obdo_free(oa);
                 if (rc)
                         CERROR("obd_setattr fails: rc = %d\n", rc);
@@ -1103,7 +1088,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
         int rc;
         ENTRY;
 
-        rc = obd_statfs(class_exp2obd(sbi->ll_lmv_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);
@@ -1114,7 +1099,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_lov_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);
@@ -1177,7 +1162,6 @@ int ll_statfs(struct super_block *sb, struct kstatfs *sfs)
 
 void ll_update_inode(struct inode *inode, struct lustre_md *md)
 {
-        struct ll_sb_info *sbi = ll_s2sbi(inode->i_sb);
         struct ll_inode_info *lli = ll_i2info(inode);
         struct lov_stripe_md *lsm = md->lsm;
         struct mds_body *body = md->body;
@@ -1221,7 +1205,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);
         }
 
         if (mea != NULL) {
@@ -1235,18 +1219,12 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
                         }
                 }
                 if (lli->lli_mea != mea)
-                        obd_free_memmd(ll_i2lmvexp(inode),
+                        obd_free_memmd(ll_i2mdexp(inode),
                                        (struct lov_stripe_md **) &mea);
         }
 
-        /*
-         * updating inode lustre id. We try optimize things a little bit here,
-         * thus do not do it all the time.
-         */
-        if (body->valid & OBD_MD_FID) {
-                LASSERT(id_fid(&body->id1) != 0);
-                id_assign_fid(&lli->lli_id, &body->id1);
-        }
+        LASSERT(id_fid(&body->id1) != 0);
+        id_assign_fid(&lli->lli_id, &body->id1);
         
         if ((body->valid & OBD_MD_FLID) || (body->valid & OBD_MD_FLGENER))
                 id_assign_stc(&lli->lli_id, &body->id1);
@@ -1300,9 +1278,6 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
         inode->i_dev = (kdev_t)id_group(&lli->lli_id);
 #endif
         LASSERT(id_fid(&lli->lli_id) != 0);
-        
-        LASSERT(!sbi->ll_lmv_desc.ld_tgt_count ||
-                id_group(&lli->lli_id) < sbi->ll_lmv_desc.ld_tgt_count);
 }
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
@@ -1394,7 +1369,7 @@ void ll_delete_inode(struct inode *inode)
 
         ll_inode2id(&id, inode);
 
-        rc = md_delete_inode(sbi->ll_lmv_exp, &id);
+        rc = md_delete_inode(sbi->ll_md_exp, &id);
         if (rc) {
                 CERROR("md_delete_inode() failed, error %d\n", 
                        rc);
@@ -1419,7 +1394,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
                 struct mds_body *body;
 
                 ll_inode2id(&id, inode);
-                rc = md_getattr(sbi->ll_lmv_exp, &id, valid, 0, &req);
+                rc = md_getattr(sbi->ll_md_exp, &id, valid, 0, &req);
                 if (rc) {
                         CERROR("failure %d inode %lu\n", rc, inode->i_ino);
                         RETURN(-abs(rc));
@@ -1462,7 +1437,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
                 attr.ia_attr_flags = flags;
                 attr.ia_valid |= ATTR_ATTR_FLAG;
 
-                rc = md_setattr(sbi->ll_lmv_exp, op_data,
+                rc = md_setattr(sbi->ll_md_exp, op_data,
                                 &attr, NULL, 0, NULL, 0, &req);
                 OBD_FREE(op_data, sizeof(*op_data));
                 if (rc) {
@@ -1479,7 +1454,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
                 oa->o_flags = flags;
                 oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS | OBD_MD_FLGROUP;
 
-                rc = obd_setattr(sbi->ll_lov_exp, oa, lsm, NULL);
+                rc = obd_setattr(sbi->ll_dt_exp, oa, lsm, NULL);
                 obdo_free(oa);
                 if (rc) {
                         if (rc != -EPERM && rc != -EACCES)
@@ -1520,27 +1495,27 @@ 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_lmv_exp);
+        obd = class_exp2obd(sbi->ll_md_exp);
         if (obd == NULL) {
                 CERROR("Invalid MDC connection handle "LPX64"\n",
-                       sbi->ll_lmv_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_lmv_exp,
+        obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_md_exp,
                       sizeof(ioc_data), &ioc_data, NULL);
 
-        obd = class_exp2obd(sbi->ll_lov_exp);
+        obd = class_exp2obd(sbi->ll_dt_exp);
         if (obd == NULL) {
                 CERROR("Invalid LOV connection handle "LPX64"\n",
-                       sbi->ll_lov_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_lov_exp,
+        obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_dt_exp,
                       sizeof(ioc_data), &ioc_data, NULL);
 
         /*
@@ -1553,14 +1528,14 @@ void ll_umount_begin(struct super_block *sb)
         EXIT;
 }
 
-int ll_prep_inode(struct obd_export *lov_exp, struct obd_export *lmv_exp,
+int ll_prep_inode(struct obd_export *dt_exp, struct obd_export *md_exp,
                   struct inode **inode, struct ptlrpc_request *req,
                   int offset, struct super_block *sb)
 {
         struct lustre_md md;
         int rc = 0;
 
-        rc = mdc_req2lustre_md(lmv_exp, req, offset, lov_exp, &md);
+        rc = mdc_req2lustre_md(md_exp, req, offset, dt_exp, &md);
         if (rc)
                 RETURN(rc);
 
@@ -1572,9 +1547,9 @@ int ll_prep_inode(struct obd_export *lov_exp, struct obd_export *lmv_exp,
                 if (*inode == NULL || is_bad_inode(*inode)) {
                         /* free the lsm if we allocated one above */
                         if (md.lsm != NULL)
-                                obd_free_memmd(lov_exp, &md.lsm);
+                                obd_free_memmd(dt_exp, &md.lsm);
                         if (md.mea != NULL)
-                                obd_free_memmd(lmv_exp,
+                                obd_free_memmd(md_exp,
                                                (struct lov_stripe_md**)&md.mea);
                         rc = -ENOMEM;
                         CERROR("new_inode -fatal: rc %d\n", rc);
@@ -1589,13 +1564,10 @@ int ll_get_fid(struct obd_export *exp, struct lustre_id *idp,
 {
         struct ptlrpc_request *request = NULL;
         struct mds_body *body;
-        __u64 valid = 0;
         int rc;
 
-        valid |= OBD_MD_FID;
-        
         rc = md_getattr_lock(exp, idp, filename, strlen(filename) + 1,
-                             valid, 0, &request);
+                             0, 0, &request);
         if (rc < 0) {
                 CDEBUG(D_INFO, "md_getattr_lock failed on %s: rc %d\n",
                        filename, rc);
index 4b567a7..e94b605 100644 (file)
@@ -54,20 +54,20 @@ static struct inode *search_inode_for_lustre(struct super_block *sb,
         if (inode)
                 return inode;
         if (S_ISREG(mode)) {
-                eadatalen = obd_size_diskmd(sbi->ll_lov_exp, NULL);
+                eadatalen = obd_size_diskmd(sbi->ll_dt_exp, NULL);
                 valid |= OBD_MD_FLEASIZE;
         }
         id_type(&id) = mode;
         id_ino(&id) = (__u64)ino;
         id_gen(&id) = generation;
 
-        rc = md_getattr(sbi->ll_lmv_exp, &id, valid, eadatalen, &req);
+        rc = md_getattr(sbi->ll_md_exp, &id, valid, eadatalen, &req);
         if (rc) {
                 CERROR("failure %d inode %lu\n", rc, ino);
                 return ERR_PTR(rc);
         }
 
-        rc = ll_prep_inode(sbi->ll_lov_exp, sbi->ll_lmv_exp,
+        rc = ll_prep_inode(sbi->ll_dt_exp, sbi->ll_md_exp,
                            &inode, req, 0, sb);
         if (rc) {
                 ptlrpc_req_finished(req);
index 7e72834..0b16f62 100644 (file)
@@ -286,7 +286,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_lov_exp, sbi->ll_lmv_exp,
+                rc = ll_prep_inode(sbi->ll_dt_exp, sbi->ll_md_exp,
                                    &inode, request, offset, dentry->d_sb);
                 if (rc)
                         RETURN(rc);
@@ -359,7 +359,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
         icbd.icbd_parent = parent;
         ll_inode2id(&pid, parent);
 
-        rc = md_intent_lock(ll_i2lmvexp(parent), &pid,
+        rc = md_intent_lock(ll_i2mdexp(parent), &pid,
                             dentry->d_name.name, dentry->d_name.len, NULL, 0,
                             NULL, it, flags, &req, ll_mdc_blocking_ast);
         if (rc < 0)
@@ -434,7 +434,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_lov_exp, sbi->ll_lmv_exp,
+        rc = ll_prep_inode(sbi->ll_dt_exp, sbi->ll_md_exp,
                            &inode, request, 1, dir->i_sb);
         if (rc)
                 GOTO(out, inode = ERR_PTR(rc));
@@ -472,7 +472,7 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
 {
         struct inode *inode;
         struct ptlrpc_request *request = it->d.lustre.it_data;
-        struct obd_export *lmv_exp = ll_i2lmvexp(dir); 
+        struct obd_export *md_exp = ll_i2mdexp(dir); 
         int rc = 0;
         ENTRY;
 
@@ -484,7 +484,7 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
         if (rc)
                 RETURN(rc);
 
-        mdc_store_inode_generation(lmv_exp, request, MDS_REQ_INTENT_REC_OFF, 1);
+        mdc_store_inode_generation(md_exp, request, MDS_REQ_INTENT_REC_OFF, 1);
         inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len,
                                NULL, 0, mode, 0, it);
         if (IS_ERR(inode))
@@ -550,7 +550,7 @@ static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev)
                 if (op_data == NULL)
                         RETURN(-ENOMEM);
                 ll_prepare_mdc_data(op_data, dir, NULL, name, len, 0);
-                err = md_create(sbi->ll_lmv_exp, op_data, NULL, 0, mode,
+                err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                                 current->fsuid, current->fsgid, rdev,
                                 &request);
                 OBD_FREE(op_data, sizeof(*op_data));
@@ -599,7 +599,7 @@ static int ll_mknod(struct inode *dir, struct dentry *child,
                 if (op_data == NULL)
                         RETURN(-ENOMEM);
                 ll_prepare_mdc_data(op_data, dir, NULL, name, len, 0);
-                err = md_create(sbi->ll_lmv_exp, op_data, NULL, 0, mode,
+                err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                                 current->fsuid, current->fsgid, rdev,
                                 &request);
                 OBD_FREE(op_data, sizeof(*op_data));
@@ -608,7 +608,7 @@ static int ll_mknod(struct inode *dir, struct dentry *child,
 
                 ll_update_times(request, 0, dir);
                 
-                err = ll_prep_inode(sbi->ll_lov_exp, sbi->ll_lmv_exp,
+                err = ll_prep_inode(sbi->ll_dt_exp, sbi->ll_md_exp,
                                     &inode, request, 0, child->d_sb);
                 if (err)
                         GOTO(out_err, err);
@@ -648,7 +648,7 @@ static int ll_symlink_raw(struct nameidata *nd, const char *tgt)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, dir, NULL, name, len, 0);
-        err = md_create(sbi->ll_lmv_exp, op_data,
+        err = md_create(sbi->ll_md_exp, op_data,
                         tgt, strlen(tgt) + 1, S_IFLNK | S_IRWXUGO,
                         current->fsuid, current->fsgid, 0, &request);
         OBD_FREE(op_data, sizeof(*op_data));
@@ -679,7 +679,7 @@ static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, src, dir, name, len, 0);
-        err = md_link(sbi->ll_lmv_exp, op_data, &request);
+        err = md_link(sbi->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (err == 0)
                 ll_update_times(request, 0, dir);
@@ -706,7 +706,7 @@ static int ll_mkdir_raw(struct nameidata *nd, int mode)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, dir, NULL, name, len, 0);
-        err = md_create(sbi->ll_lmv_exp, op_data, NULL, 0, mode,
+        err = md_create(sbi->ll_md_exp, op_data, NULL, 0, mode,
                         current->fsuid, current->fsgid, 0, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (err == 0)
@@ -731,7 +731,7 @@ static int ll_rmdir_raw(struct nameidata *nd)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, dir, NULL, name, len, S_IFDIR);
-        rc = md_unlink(ll_i2sbi(dir)->ll_lmv_exp, op_data, &request);
+        rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc == 0)
                 ll_update_times(request, 0, dir);
@@ -772,7 +772,7 @@ int ll_objects_destroy(struct ptlrpc_request *request,
                 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);
@@ -808,14 +808,14 @@ int ll_objects_destroy(struct ptlrpc_request *request,
                 }
         }
 
-        rc = obd_destroy(ll_i2obdexp(dir), oa, lsm, &oti);
+        rc = obd_destroy(ll_i2dtexp(dir), oa, lsm, &oti);
         obdo_free(oa);
         if (rc)
                 CERROR("obd destroy objid "LPX64" error %d\n",
                        lsm->lsm_object_id, rc);
         EXIT;
  out_free_memmd:
-        obd_free_memmd(ll_i2obdexp(dir), &lsm);
+        obd_free_memmd(ll_i2dtexp(dir), &lsm);
  out:
         return rc;
 }
@@ -836,7 +836,7 @@ static int ll_unlink_raw(struct nameidata *nd)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, dir, NULL, name, len, 0);
-        rc = md_unlink(ll_i2sbi(dir)->ll_lmv_exp, op_data, &request);
+        rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc)
                 GOTO(out, rc);
@@ -870,7 +870,7 @@ static int ll_rename_raw(struct nameidata *oldnd, struct nameidata *newnd)
         if (op_data == NULL)
                 RETURN(-ENOMEM);
         ll_prepare_mdc_data(op_data, src, tgt, NULL, 0, 0);
-        err = md_rename(sbi->ll_lmv_exp, op_data, oldname, oldlen,
+        err = md_rename(sbi->ll_md_exp, op_data, oldname, oldlen,
                         newname, newlen, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (!err) {
index 9a52fab..8a7f6eb 100644 (file)
@@ -94,7 +94,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)
@@ -143,7 +143,7 @@ void ll_truncate(struct inode *inode)
 
         /* truncate == punch from new size to absolute end of file */
         /* NB: obd_punch must be called with i_sem held!  It updates the kms! */
-        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);
@@ -189,7 +189,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 | OBD_MD_FLGROUP;
 
-        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)
                 GOTO(out_free_oa, rc);
@@ -386,7 +386,7 @@ struct ll_async_page *llap_from_page(struct page *page)
         if (llap != NULL)
                 RETURN(llap);
 
-        exp = ll_i2obdexp(page->mapping->host);
+        exp = ll_i2dtexp(page->mapping->host);
         if (exp == NULL)
                 RETURN(ERR_PTR(-EINVAL));
 
@@ -502,7 +502,7 @@ int ll_commit_write(struct file *file, struct page *page, unsigned from,
                 lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats,
                                      LPROC_LL_DIRTY_MISSES);
 
-                exp = ll_i2obdexp(inode);
+                exp = ll_i2dtexp(inode);
                 if (exp == NULL)
                         RETURN(-EINVAL);
 
@@ -543,7 +543,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);
 
@@ -669,7 +669,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;
@@ -718,7 +718,7 @@ static int ll_page_matches(struct page *page, int fd_flags)
         page_extent.l_extent.end =
                 page_extent.l_extent.start + PAGE_CACHE_SIZE - 1;
         flags = LDLM_FL_CBPENDING | LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
-        matches = obd_match(ll_i2sbi(inode)->ll_lov_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);
@@ -1020,7 +1020,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);
 
index cd1b1ce..4ac9cad 100644 (file)
@@ -114,7 +114,7 @@ static int ll_direct_IO_24(int rw, struct inode *inode, struct kiobuf *iobuf,
                 lprocfs_counter_add(ll_i2sbi(inode)->ll_stats,
                                     LPROC_LL_DIRECT_READ, iobuf->length);
         rc = obd_brw_async(rw == WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
-                           ll_i2obdexp(inode), oa, lsm, iobuf->nr_pages, pga,
+                           ll_i2dtexp(inode), oa, lsm, iobuf->nr_pages, pga,
                            set, NULL);
         if (rc) {
                 CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR,
@@ -129,7 +129,7 @@ static int ll_direct_IO_24(int rw, struct inode *inode, struct kiobuf *iobuf,
                 void lov_increase_kms(struct obd_export *,
                                       struct lov_stripe_md *, obd_off size);
                 obd_off size = offset + length;
-                lov_increase_kms(ll_i2obdexp(inode), lsm, size);
+                lov_increase_kms(ll_i2dtexp(inode), lsm, size);
                 if (size > inode->i_size)
                         inode->i_size = size;
         }
index cd3a552..ae0d11f 100644 (file)
@@ -271,7 +271,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_lmv_exp, inode, filp);
+        err = ll_md_close(sbi->ll_md_exp, inode, filp);
 
         if (err && rc == 0)
                 rc = err;
@@ -310,7 +310,7 @@ static int ll_special_open(struct inode *inode, struct file *filp)
         err = ll_local_open(filp, it);
         if (rc != 0) {
                 CERROR("error opening special file: rc %d\n", rc);
-                ll_mdc_close(ll_i2sbi(inode)->ll_lmv_exp, inode, filp);
+                ll_md_close(ll_i2sbi(inode)->ll_md_exp, inode, filp);
         } else if (err) {
                 if (pfop && *pfop) {
                         if ((*pfop)->release)
index 9364ec8..f913d8a 100644 (file)
@@ -49,7 +49,7 @@ static int ll_readlink_internal(struct inode *inode,
         }
 
         ll_inode2id(&id, inode);
-        rc = md_getattr(sbi->ll_lmv_exp, &id, OBD_MD_LINKNAME, symlen,
+        rc = md_getattr(sbi->ll_md_exp, &id, OBD_MD_LINKNAME, symlen,
                         request);
         if (rc) {
                 if (rc != -ENOENT)
index 436fb48..1badf65 100644 (file)
@@ -157,8 +157,7 @@ repeat:
         }
 
         rc = md_intent_lock(lmv->tgts[id_group(&rpid)].ltd_exp, &rpid, name,
-                            len, lmm, lmmsize, cid, it, flags, reqp,
-                            cb_blocking);
+                            len, lmm, lmmsize, cid, it, flags, reqp, cb_blocking);
         if (rc == -ERESTART) {
                 /* directory got splitted. time to update local object and
                  * repeat the request with proper MDS */
@@ -272,9 +271,11 @@ int lmv_intent_getattr(struct obd_export *exp, struct lustre_id *pid,
                                mds, OLID4(&rpid));
                 }
         }
+
+        /* the same about fid returning. */
         rc = md_intent_lock(lmv->tgts[mds].ltd_exp, &rpid, name,
-                            len, lmm, lmmsize, cid, it, flags, reqp,
-                            cb_blocking);
+                            len, lmm, lmmsize, cid, it, flags,
+                            reqp, cb_blocking);
         if (rc < 0)
                 RETURN(rc);
        
@@ -326,7 +327,8 @@ int lmv_intent_getattr(struct obd_export *exp, struct lustre_id *pid,
                 CDEBUG(D_OTHER, "attrs from slaves for "DLID4", rc %d\n",
                        OLID4(cid), rc);
                 
-                rc = lmv_revalidate_slaves(exp, reqp, cid, it, 1, cb_blocking);
+                rc = lmv_revalidate_slaves(exp, reqp, cid, it, 1,
+                                           cb_blocking);
                 lmv_put_obj(obj2);
         }
         RETURN(rc);
@@ -496,8 +498,8 @@ repeat:
                 }
         }
         rc = md_intent_lock(lmv->tgts[mds].ltd_exp, &rpid, name,
-                            len, lmm, lmmsize, cid, it, flags, reqp, 
-                            cb_blocking);
+                            len, lmm, lmmsize, cid, it, flags,
+                            reqp, cb_blocking);
         if (rc > 0) {
                 LASSERT(cid != 0);
                 RETURN(rc);
@@ -537,8 +539,8 @@ repeat:
 
         /* okay, MDS has returned success. Probably name has been resolved in
          * remote inode. */
-        rc = lmv_handle_remote_inode(exp, lmm, lmmsize, it, flags,
-                                     reqp, cb_blocking);
+        rc = lmv_handle_remote_inode(exp, lmm, lmmsize, it,
+                                     flags, reqp, cb_blocking);
 
         if (rc == 0 && (mea = lmv_splitted_dir_body(*reqp, 1))) {
                 /* wow! this is splitted dir, we'd like to handle it */
index e7c840d..5abd02a 100644 (file)
@@ -1074,7 +1074,6 @@ int lmv_getattr_lock(struct obd_export *exp, struct lustre_id *id,
         struct lustre_id rid = *id;
         struct mds_body *body;
         struct lmv_obj *obj;
-        __u64 old_valid;
         ENTRY;
         
         rc = lmv_check_connect(obd);
@@ -1094,16 +1093,6 @@ repeat:
         CDEBUG(D_OTHER, "getattr_lock for %*s on "DLID4" -> "DLID4"\n",
                namelen, filename, OLID4(id), OLID4(&rid));
 
-       old_valid = valid;
-
-        /*
-         * here should be applied OBD_MD_FID to ->valid, because otherwise,
-         * mds_getattr_lock() will not fetch fid component of lustre_id and
-         * thus, next call to md_getattr_lock() will be performed to wrong mds.
-         */
-        if (!(old_valid & OBD_MD_FID))
-                valid |= OBD_MD_FID;
-        
         rc = md_getattr_lock(lmv->tgts[id_group(&rid)].ltd_exp, 
                              &rid, filename, namelen, valid,
                              ea_size, request);
@@ -1121,14 +1110,6 @@ repeat:
                         rid = body->id1;
                         CDEBUG(D_OTHER, "request attrs for "DLID4"\n", OLID4(&rid));
 
-                        /* 
-                         * turning OBD_MD_FID fetching off, as we already have
-                         * full lustre_id and do need to fetch fid component
-                         * again. This will help to make thing slightly faster.
-                         */
-                        if (!(old_valid & OBD_MD_FID))
-                                valid &= ~OBD_MD_FID;
-                        
                         rc = md_getattr_lock(lmv->tgts[id_group(&rid)].ltd_exp, 
                                              &rid, NULL, 1, valid, ea_size, &req);
                         ptlrpc_req_finished(*request);
index 4994b1e..0eda25b 100644 (file)
@@ -1183,7 +1183,7 @@ static int fsfilt_ext3_setup(struct obd_device *obd, struct super_block *sb)
 #endif
         /* setup mdsnum in underlying fs */
 #ifdef EXT3_FEATURE_INCOMPAT_MDSNUM
-        if (mds->mds_lmv_obd) {
+        if (mds->mds_md_obd) {
                 struct ext3_sb_info *sbi = EXT3_SB(sb);
                 struct ext3_super_block *es = sbi->s_es;
                 handle_t *handle;
index 60ff51e..861aeb9 100644 (file)
@@ -514,15 +514,6 @@ int mdc_intent_lock(struct obd_export *exp, struct lustre_id *pid,
 
                 mdc_id2mdc_data(op_data, pid, cid, name, len, 0);
 
-                /* 
-                 * if we get inode by name (ll_lookup_it() case), we
-                 * always should ask for fid, as we will not be able to
-                 * take locks, revalidate dentry, etc. later with
-                 * invalid fid in inode.
-                 */
-                if (cid == NULL && name != NULL)
-                        op_data->valid |= OBD_MD_FID;
-
                 rc = mdc_enqueue(exp, LDLM_IBITS, it, it_to_lock_mode(it),
                                  op_data, &lockh, lmm, lmmsize,
                                  ldlm_completion_ast, cb_blocking, NULL);
index 090f6b8..2e8c20c 100644 (file)
@@ -432,8 +432,8 @@ static int mds_connect_post(struct obd_export *exp, unsigned long flags)
                                atomic_read(&mds->mds_real_clients));
                         exp->exp_flags |= OBD_OPT_REAL_CLIENT;
                 }
-                if (mds->mds_lmv_name)
-                        rc = mds_lmv_connect(obd, mds->mds_lmv_name);
+                if (mds->mds_md_name)
+                        rc = mds_md_connect(obd, mds->mds_md_name);
         }
         RETURN(rc);
 }
@@ -529,7 +529,7 @@ static int mds_disconnect(struct obd_export *exp, unsigned long flags)
         if (!(exp->exp_flags & OBD_OPT_REAL_CLIENT)
             && !atomic_read(&mds->mds_real_clients)) {
                 /* there was no client at all */
-                mds_lmv_disconnect(obd, flags);
+                mds_md_disconnect(obd, flags);
         }
 
         if ((exp->exp_flags & OBD_OPT_REAL_CLIENT)
@@ -538,7 +538,7 @@ static int mds_disconnect(struct obd_export *exp, unsigned long flags)
                 CDEBUG(D_OTHER, "%s: last real client %s disconnected.  "
                        "Disconnnect from LMV now\n",
                        obd->obd_name, exp->exp_client_uuid.uuid);
-                mds_lmv_disconnect(obd, flags);
+                mds_md_disconnect(obd, flags);
         }
 
         spin_lock_irqsave(&exp->exp_lock, irqflags);
@@ -583,8 +583,6 @@ static int mds_getstatus(struct ptlrpc_request *req)
         }
 
         body = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*body));
-        
-        body->valid |= OBD_MD_FID;
         memcpy(&body->id1, &mds->mds_rootid, sizeof(body->id1));
 
         /*
@@ -758,15 +756,13 @@ static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry,
         LASSERT(body != NULL);                 /* caller prepped reply */
 
         if (dentry->d_flags & DCACHE_CROSS_REF) {
-                mds_pack_dentry2body(obd, body, dentry,
-                                     (reqbody->valid & OBD_MD_FID) ? 1 : 0);
+                mds_pack_dentry2body(obd, body, dentry, 1);
                 CDEBUG(D_OTHER, "cross reference: "DLID4"\n",
                        OLID4(&body->id1));
                 RETURN(0);
         }
         
-        mds_pack_inode2body(obd, body, inode, 
-                           (reqbody->valid & OBD_MD_FID) ? 1 : 0);
+        mds_pack_inode2body(obd, body, inode, 1);
 
         if ((S_ISREG(inode->i_mode) && (reqbody->valid & OBD_MD_FLEASIZE)) ||
             (S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA))) {
@@ -900,7 +896,7 @@ int mds_check_mds_num(struct obd_device *obd, struct inode *inode,
         int mea_size, rc = 0;
         ENTRY;
         
-        rc = mds_get_lmv_attr(obd, inode, &mea, &mea_size);
+        rc = mds_md_get_attr(obd, inode, &mea, &mea_size);
         if (rc)
                 RETURN(rc);
         if (mea != NULL) {
@@ -1768,7 +1764,7 @@ repeat:
                 obdo_from_inode(&repbody->oa, new->d_inode, FILTER_VALID_FLAGS);
                 repbody->oa.o_id = new->d_inode->i_ino;
                 repbody->oa.o_generation = new->d_inode->i_generation;
-                repbody->oa.o_valid |= OBD_MD_FLID | OBD_MD_FLGENER | OBD_MD_FID;
+                repbody->oa.o_valid |= OBD_MD_FLID | OBD_MD_FLGENER;
 
                 if ((body->oa.o_flags & OBD_FL_RECREATE_OBJS) ||
                     lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
@@ -1831,7 +1827,7 @@ repeat:
         if (body->oa.o_valid & OBD_MD_FLID) {
                 /* this is new object for splitted dir. We have to prevent
                  * recursive splitting on it -bzzz */
-                mealen = obd_size_diskmd(mds->mds_lmv_exp, NULL);
+                mealen = obd_size_diskmd(mds->mds_md_exp, NULL);
 
                 OBD_ALLOC(mea, mealen);
                 if (mea == NULL)
@@ -1956,7 +1952,7 @@ static int mds_set_info(struct obd_export *exp, __u32 keylen,
                 
                 /* mds number has been changed, so the corresponding obdfilter
                  * exp need to be changed too. */
-                rc = obd_set_info(mds->mds_lov_exp, strlen("mds_conn"),
+                rc = obd_set_info(mds->mds_dt_exp, strlen("mds_conn"),
                                   "mds_conn", valsize, &group);
                 RETURN(rc);
         }
@@ -2686,9 +2682,9 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf)
                         lcfg->lcfg_inlbuf4);
 
         /* we have to know mdsnum before touching underlying fs -bzzz */
-        sema_init(&mds->mds_lmv_sem, 1);
-        mds->mds_lmv_connected = 0;
-        mds->mds_lmv_name = NULL;
+        sema_init(&mds->mds_md_sem, 1);
+        mds->mds_md_connected = 0;
+        mds->mds_md_name = NULL;
         
         if (lcfg->lcfg_inllen5 > 0 && lcfg->lcfg_inlbuf5 && 
             strncmp(lcfg->lcfg_inlbuf5, "dumb", lcfg->lcfg_inllen5)) {
@@ -2698,18 +2694,18 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf)
                        obd->obd_name, lcfg->lcfg_inlbuf5);
 
                 generate_random_uuid(uuid);
-                class_uuid_unparse(uuid, &mds->mds_lmv_uuid);
+                class_uuid_unparse(uuid, &mds->mds_md_uuid);
 
-                OBD_ALLOC(mds->mds_lmv_name, lcfg->lcfg_inllen5);
-                if (mds->mds_lmv_name == NULL) 
+                OBD_ALLOC(mds->mds_md_name, lcfg->lcfg_inllen5);
+                if (mds->mds_md_name == NULL) 
                         RETURN(rc = -ENOMEM);
 
-                memcpy(mds->mds_lmv_name, lcfg->lcfg_inlbuf5,
+                memcpy(mds->mds_md_name, lcfg->lcfg_inlbuf5,
                        lcfg->lcfg_inllen5);
                 
-                rc = mds_lmv_connect(obd, mds->mds_lmv_name);
+                rc = mds_md_connect(obd, mds->mds_md_name);
                 if (rc) {
-                        OBD_FREE(mds->mds_lmv_name, lcfg->lcfg_inllen5);
+                        OBD_FREE(mds->mds_md_name, lcfg->lcfg_inllen5);
                         GOTO(err_ops, rc);
                 }
         }
@@ -2768,7 +2764,7 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf)
                 class_uuid_t uuid;
 
                 generate_random_uuid(uuid);
-                class_uuid_unparse(uuid, &mds->mds_lov_uuid);
+                class_uuid_unparse(uuid, &mds->mds_dt_uuid);
 
                 OBD_ALLOC(mds->mds_profile, lcfg->lcfg_inllen3);
                 if (mds->mds_profile == NULL)
@@ -2782,8 +2778,8 @@ static int mds_setup(struct obd_device *obd, obd_count len, void *buf)
          * setup root dir and files ID dir if lmv already connected, or there is
          * not lmv at all.
          */
-        if (mds->mds_lmv_exp || (lcfg->lcfg_inllen3 > 0 && lcfg->lcfg_inlbuf3 &&
-                                 strncmp(lcfg->lcfg_inlbuf3, "dumb", lcfg->lcfg_inllen3)))
+        if (mds->mds_md_exp || (lcfg->lcfg_inllen3 > 0 && lcfg->lcfg_inlbuf3 &&
+                                strncmp(lcfg->lcfg_inlbuf3, "dumb", lcfg->lcfg_inllen3)))
         {
                 rc = mds_fs_setup_rootid(obd);
                 if (rc)
@@ -2838,7 +2834,7 @@ static int mds_postsetup(struct obd_device *obd)
                 struct config_llog_instance cfg;
 
                 cfg.cfg_instance = NULL;
-                cfg.cfg_uuid = mds->mds_lov_uuid;
+                cfg.cfg_uuid = mds->mds_dt_uuid;
                 push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
 
                 lgctxt = llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
@@ -2858,18 +2854,18 @@ static int mds_postsetup(struct obd_device *obd)
                         CERROR("No profile found: %s\n", mds->mds_profile);
                         GOTO(err_cleanup, rc = -ENOENT);
                 }
-                rc = mds_lov_connect(obd, lprof->lp_lov);
+                rc = mds_dt_connect(obd, lprof->lp_lov);
                 if (rc)
                         GOTO(err_cleanup, rc);
 
-                rc = mds_lmv_postsetup(obd);
+                rc = mds_md_postsetup(obd);
                 if (rc)
                         GOTO(err_cleanup, rc);
         }
 
         RETURN(rc);
 err_cleanup:
-        mds_lov_clean(obd);
+        mds_dt_clean(obd);
 err_llog:
         obd_llog_cleanup(llog_get_context(&obd->obd_llogs,
                                           LLOG_CONFIG_ORIG_CTXT));
@@ -2889,9 +2885,9 @@ int mds_postrecov(struct obd_device *obd)
         LASSERT(ctxt != NULL);
 
         /* set nextid first, so we are sure it happens */
-        rc = mds_lov_set_nextid(obd);
+        rc = mds_dt_set_nextid(obd);
         if (rc) {
-                CERROR("%s: mds_lov_set_nextid failed\n", obd->obd_name);
+                CERROR("%s: mds_dt_set_nextid() failed\n", obd->obd_name);
                 GOTO(out, rc);
         }
 
@@ -2903,12 +2899,12 @@ int mds_postrecov(struct obd_device *obd)
 
         group = FILTER_GROUP_FIRST_MDS + mds->mds_num;
         valsize = sizeof(group);
-        rc = obd_set_info(mds->mds_lov_exp, strlen("mds_conn"), "mds_conn",
+        rc = obd_set_info(mds->mds_dt_exp, strlen("mds_conn"), "mds_conn",
                           valsize, &group);
         if (rc)
                 GOTO(out, rc);
 
-        rc = llog_connect(ctxt, obd->u.mds.mds_lov_desc.ld_tgt_count,
+        rc = llog_connect(ctxt, obd->u.mds.mds_dt_desc.ld_tgt_count,
                           NULL, NULL, NULL);
         if (rc) {
                 CERROR("%s: failed at llog_origin_connect: %d\n", 
@@ -2917,7 +2913,7 @@ int mds_postrecov(struct obd_device *obd)
         }
 
         /* remove the orphaned precreated objects */
-        rc = mds_lov_clearorphans(mds, NULL /* all OSTs */);
+        rc = mds_dt_clearorphans(mds, NULL /* all OSTs */);
         if (rc)
                 GOTO(err_llog, rc);
 
@@ -2927,14 +2923,14 @@ out:
 err_llog:
         /* cleanup all llogging subsystems */
         rc = obd_llog_finish(obd, &obd->obd_llogs,
-                             mds->mds_lov_desc.ld_tgt_count);
+                             mds->mds_dt_desc.ld_tgt_count);
         if (rc)
                 CERROR("%s: failed to cleanup llogging subsystems\n",
                         obd->obd_name);
         goto out;
 }
 
-int mds_lov_clean(struct obd_device *obd)
+int mds_dt_clean(struct obd_device *obd)
 {
         struct mds_obd *mds = &obd->u.mds;
         ENTRY;
@@ -2950,7 +2946,7 @@ int mds_lov_clean(struct obd_device *obd)
                 sprintf(cln_prof, "%s-clean", mds->mds_profile);
 
                 cfg.cfg_instance = NULL;
-                cfg.cfg_uuid = mds->mds_lov_uuid;
+                cfg.cfg_uuid = mds->mds_dt_uuid;
 
                 push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
                 llctx = llog_get_context(&obd->obd_llogs,
@@ -2965,14 +2961,14 @@ int mds_lov_clean(struct obd_device *obd)
         RETURN(0);
 }
 
-int mds_lmv_clean(struct obd_device *obd)
+int mds_md_clean(struct obd_device *obd)
 {
         struct mds_obd *mds = &obd->u.mds;
         ENTRY;
 
-        if (mds->mds_lmv_name) {
-                OBD_FREE(mds->mds_lmv_name, strlen(mds->mds_lmv_name) + 1);
-                mds->mds_lmv_name = NULL;
+        if (mds->mds_md_name) {
+                OBD_FREE(mds->mds_md_name, strlen(mds->mds_md_name) + 1);
+                mds->mds_md_name = NULL;
         }
         RETURN(0);
 }
@@ -2982,9 +2978,9 @@ static int mds_precleanup(struct obd_device *obd, int flags)
         int rc = 0;
         ENTRY;
 
-        mds_lmv_clean(obd);
-        mds_lov_disconnect(obd, flags);
-        mds_lov_clean(obd);
+        mds_md_clean(obd);
+        mds_dt_disconnect(obd, flags);
+        mds_dt_clean(obd);
         obd_llog_cleanup(llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT));
         RETURN(rc);
 }
@@ -3000,10 +2996,10 @@ static int mds_cleanup(struct obd_device *obd, int flags)
         mds_update_server_data(obd, 1);
         mds_update_last_fid(obd, NULL, 1);
         
-        if (mds->mds_lov_objids != NULL) {
-                int size = mds->mds_lov_desc.ld_tgt_count *
+        if (mds->mds_dt_objids != NULL) {
+                int size = mds->mds_dt_desc.ld_tgt_count *
                         sizeof(obd_id);
-                OBD_FREE(mds->mds_lov_objids, size);
+                OBD_FREE(mds->mds_dt_objids, size);
         }
         mds_fs_cleanup(obd, flags);
 
index 8eb6819..3912499 100644 (file)
@@ -93,7 +93,7 @@ static int lprocfs_mds_wr_config_update(struct file *file, const char *buffer,
         struct obd_device *obd = data;
         ENTRY;
 
-        RETURN(mds_lov_update_config(obd, 0));
+        RETURN(mds_dt_update_config(obd, 0));
 }
 
 static int lprocfs_rd_last_fid(char *page, char **start, off_t off,
index 904b657..ed41934 100644 (file)
@@ -788,7 +788,7 @@ int mds_fs_setup(struct obd_device *obd, struct vfsmount *mnt)
                 CERROR("cannot open/create %s file: rc = %d\n", LOV_OBJID, rc);
                 GOTO(err_last_fid, rc = PTR_ERR(file));
         }
-        mds->mds_lov_objid_filp = file;
+        mds->mds_dt_objid_filp = file;
         if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
                 CERROR("%s is not a regular file!: mode = %o\n", LOV_OBJID,
                        file->f_dentry->d_inode->i_mode);
@@ -804,7 +804,7 @@ err_pop:
         return rc;
 
 err_lov_objid:
-        if (mds->mds_lov_objid_filp && filp_close(mds->mds_lov_objid_filp, 0))
+        if (mds->mds_dt_objid_filp && filp_close(mds->mds_dt_objid_filp, 0))
                 CERROR("can't close %s after error\n", LOV_OBJID);
 err_virtid_fid:
         if (mds->mds_virtid_filp && filp_close(mds->mds_virtid_filp, 0))
@@ -872,9 +872,9 @@ int mds_fs_cleanup(struct obd_device *obd, int flags)
                 if (rc)
                         CERROR("%s file won't close, rc = %d\n", LAST_RCVD, rc);
         }
-        if (mds->mds_lov_objid_filp) {
-                rc = filp_close(mds->mds_lov_objid_filp, 0);
-                mds->mds_lov_objid_filp = NULL;
+        if (mds->mds_dt_objid_filp) {
+                rc = filp_close(mds->mds_dt_objid_filp, 0);
+                mds->mds_dt_objid_filp = NULL;
                 if (rc)
                         CERROR("%s file won't close, rc=%d\n", LOV_OBJID, rc);
         }
index f09833e..be2fcfc 100644 (file)
@@ -114,20 +114,20 @@ int mds_llog_init(struct obd_device *obd, struct obd_llogs *,
 int mds_llog_finish(struct obd_device *obd, struct obd_llogs *, int count);
 
 /* mds/mds_lov.c */
-int mds_lov_connect(struct obd_device *obd, char * lov_name);
-int mds_lov_disconnect(struct obd_device *obd, int flags);
-int mds_lov_set_info(struct obd_export *exp, obd_count keylen,
+int mds_dt_connect(struct obd_device *obd, char * lov_name);
+int mds_dt_disconnect(struct obd_device *obd, int flags);
+int mds_dt_set_info(struct obd_export *exp, obd_count keylen,
                      void *key, obd_count vallen, void *val);
 int mds_get_lovtgts(struct obd_device *, int tgt_count, struct obd_uuid *);
-int mds_lov_write_objids(struct obd_device *obd);
-void mds_lov_update_objids(struct obd_device *obd, obd_id *ids);
-int mds_lov_set_growth(struct mds_obd *mds, int count);
-int mds_lov_set_nextid(struct obd_device *obd);
-int mds_lov_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid);
+int mds_dt_write_objids(struct obd_device *obd);
+void mds_dt_update_objids(struct obd_device *obd, obd_id *ids);
+int mds_dt_set_growth(struct mds_obd *mds, int count);
+int mds_dt_set_nextid(struct obd_device *obd);
+int mds_dt_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid);
 int mds_post_mds_lovconf(struct obd_device *obd);
 int mds_notify(struct obd_device *obd, struct obd_device *watched,
                int active, void *data);
-int mds_lov_update_config(struct obd_device *obd, int transno);
+int mds_dt_update_config(struct obd_device *obd, int transno);
 int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
                        struct lov_mds_md *lmm, int lmm_size);
 int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
@@ -159,7 +159,7 @@ void mds_squash_root(struct mds_obd *mds, struct mds_req_sec_desc *rsd,
                      ptl_nid_t *peernid);
 int mds_handle(struct ptlrpc_request *req);
 extern struct lvfs_callback_ops mds_lvfs_ops;
-int mds_lov_clean(struct obd_device *obd);
+int mds_dt_clean(struct obd_device *obd);
 int mds_postrecov(struct obd_device *obd);
 extern struct lvfs_callback_ops mds_lvfs_ops;
 
@@ -220,14 +220,14 @@ void mds_pack_dentry2body(struct obd_device *, struct mds_body *b,
 #endif
 
 /* mds/mds_lmv.c */
-int mds_lmv_postsetup(struct obd_device *obd);
-int mds_lmv_connect(struct obd_device *obd, char * lov_name);
-int mds_lmv_disconnect(struct obd_device *obd, int flags);
+int mds_md_postsetup(struct obd_device *obd);
+int mds_md_connect(struct obd_device *obd, char * lov_name);
+int mds_md_disconnect(struct obd_device *obd, int flags);
 int mds_try_to_split_dir(struct obd_device *, struct dentry *, struct mea **,
                          int, int);
-int mds_get_lmv_attr(struct obd_device *, struct inode *, struct mea **, int *);
+int mds_md_get_attr(struct obd_device *, struct inode *, struct mea **, int *);
 int mds_choose_mdsnum(struct obd_device *, const char *, int, int);
-int mds_lmv_postsetup(struct obd_device *);
+int mds_md_postsetup(struct obd_device *);
 int mds_splitting_expected(struct obd_device *, struct dentry *);
 int mds_lock_slave_objs(struct obd_device *, struct dentry *,
                         struct lustre_handle **);
index b64ba2e..556b1eb 100644 (file)
@@ -180,9 +180,6 @@ void mds_pack_dentry2body(struct obd_device *obd,
         b->valid |= OBD_MD_FLID | OBD_MD_FLGENER |
                 OBD_MD_MDS;
 
-        if (read_fid)
-                b->valid |= OBD_MD_FID;
-        
         mds_pack_dentry2id(obd, &b->id1, dentry,
                            read_fid);
 }
@@ -245,8 +242,6 @@ void mds_pack_inode2body(struct obd_device *obd, struct mds_body *b,
         } else {
                 b->nlink = inode->i_nlink;
         }
-        if (read_fid)
-                b->valid |= OBD_MD_FID;
         mds_pack_inode2id(obd, &b->id1, inode, read_fid);
 }
 
index 066ca63..2093a19 100644 (file)
  * TODO:
  *   - magic in mea struct
  */
-int mds_lmv_connect(struct obd_device *obd, char *lmv_name)
+int mds_md_connect(struct obd_device *obd, char *md_name)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_handle conn = {0};
         int rc, valsize, value;
         ENTRY;
 
-        if (IS_ERR(mds->mds_lmv_obd))
-                RETURN(PTR_ERR(mds->mds_lmv_obd));
+        if (IS_ERR(mds->mds_md_obd))
+                RETURN(PTR_ERR(mds->mds_md_obd));
 
-        if (mds->mds_lmv_connected)
+        if (mds->mds_md_connected)
                 RETURN(0);
 
-        down(&mds->mds_lmv_sem);
-        if (mds->mds_lmv_connected) {
-                up(&mds->mds_lmv_sem);
+        down(&mds->mds_md_sem);
+        if (mds->mds_md_connected) {
+                up(&mds->mds_md_sem);
                 RETURN(0);
         }
 
-        mds->mds_lmv_obd = class_name2obd(lmv_name);
-        if (!mds->mds_lmv_obd) {
-                CERROR("MDS cannot locate LMV %s\n",
-                       lmv_name);
-                mds->mds_lmv_obd = ERR_PTR(-ENOTCONN);
+        mds->mds_md_obd = class_name2obd(md_name);
+        if (!mds->mds_md_obd) {
+                CERROR("MDS cannot locate MD(LMV) %s\n",
+                       md_name);
+                mds->mds_md_obd = ERR_PTR(-ENOTCONN);
                 GOTO(err_last, rc = -ENOTCONN);
         }
 
-        rc = obd_connect(&conn, mds->mds_lmv_obd,
+        rc = obd_connect(&conn, mds->mds_md_obd,
                          &obd->obd_uuid, OBD_OPT_MDS_CONNECTION);
         if (rc) {
-                CERROR("MDS cannot connect to LMV %s (%d)\n",
-                       lmv_name, rc);
-                mds->mds_lmv_obd = ERR_PTR(rc);
+                CERROR("MDS cannot connect to MD(LMV) %s (%d)\n",
+                       md_name, rc);
+                mds->mds_md_obd = ERR_PTR(rc);
                 GOTO(err_last, rc);
         }
-        mds->mds_lmv_exp = class_conn2export(&conn);
-        if (mds->mds_lmv_exp == NULL)
+        mds->mds_md_exp = class_conn2export(&conn);
+        if (mds->mds_md_exp == NULL)
                 CERROR("can't get export!\n");
 
-        rc = obd_register_observer(mds->mds_lmv_obd, obd);
+        rc = obd_register_observer(mds->mds_md_obd, obd);
         if (rc) {
-                CERROR("MDS cannot register as observer of LMV %s, "
-                       "rc = %d\n", lmv_name, rc);
+                CERROR("MDS cannot register as observer of MD(LMV) %s, "
+                       "rc = %d\n", md_name, rc);
                 GOTO(err_discon, rc);
         }
 
         /* retrieve size of EA */
-        rc = obd_get_info(mds->mds_lmv_exp, strlen("mdsize"),
+        rc = obd_get_info(mds->mds_md_exp, strlen("mdsize"),
                           "mdsize", &valsize, &value);
         if (rc) 
                 GOTO(err_reg, rc);
@@ -98,41 +98,41 @@ int mds_lmv_connect(struct obd_device *obd, char *lmv_name)
                 mds->mds_max_mdsize = value;
 
         /* find our number in LMV cluster */
-        rc = obd_get_info(mds->mds_lmv_exp, strlen("mdsnum"),
+        rc = obd_get_info(mds->mds_md_exp, strlen("mdsnum"),
                           "mdsnum", &valsize, &value);
         if (rc) 
                 GOTO(err_reg, rc);
         
         mds->mds_num = value;
 
-        rc = obd_set_info(mds->mds_lmv_exp, strlen("inter_mds"),
+        rc = obd_set_info(mds->mds_md_exp, strlen("inter_mds"),
                           "inter_mds", 0, NULL);
         if (rc)
                 GOTO(err_reg, rc);
 
-        mds->mds_lmv_connected = 1;
-        up(&mds->mds_lmv_sem);
+        mds->mds_md_connected = 1;
+        up(&mds->mds_md_sem);
        RETURN(0);
 
 err_reg:
-        obd_register_observer(mds->mds_lmv_obd, NULL);
+        obd_register_observer(mds->mds_md_obd, NULL);
 err_discon:
-        obd_disconnect(mds->mds_lmv_exp, 0);
-        mds->mds_lmv_exp = NULL;
-        mds->mds_lmv_obd = ERR_PTR(rc);
+        obd_disconnect(mds->mds_md_exp, 0);
+        mds->mds_md_exp = NULL;
+        mds->mds_md_obd = ERR_PTR(rc);
 err_last:
-        up(&mds->mds_lmv_sem);
+        up(&mds->mds_md_sem);
         return rc;
 }
 
-int mds_lmv_postsetup(struct obd_device *obd)
+int mds_md_postsetup(struct obd_device *obd)
 {
         struct mds_obd *mds = &obd->u.mds;
         int rc = 0;
         ENTRY;
 
-        if (mds->mds_lmv_exp) {
-                rc = obd_init_ea_size(mds->mds_lmv_exp,
+        if (mds->mds_md_exp) {
+                rc = obd_init_ea_size(mds->mds_md_exp,
                                       mds->mds_max_mdsize,
                                       mds->mds_max_cookiesize);
         }
@@ -140,26 +140,26 @@ int mds_lmv_postsetup(struct obd_device *obd)
         RETURN(rc);
 }
 
-int mds_lmv_disconnect(struct obd_device *obd, int flags)
+int mds_md_disconnect(struct obd_device *obd, int flags)
 {
         struct mds_obd *mds = &obd->u.mds;
         int rc = 0;
         ENTRY;
 
-        if (!mds->mds_lmv_connected)
+        if (!mds->mds_md_connected)
                 RETURN(0);
 
-        down(&mds->mds_lmv_sem);
-        if (!IS_ERR(mds->mds_lmv_obd) && mds->mds_lmv_exp != NULL) {
-                LASSERT(mds->mds_lmv_connected);
+        down(&mds->mds_md_sem);
+        if (!IS_ERR(mds->mds_md_obd) && mds->mds_md_exp != NULL) {
+                LASSERT(mds->mds_md_connected);
                 
-                obd_register_observer(mds->mds_lmv_obd, NULL);
+                obd_register_observer(mds->mds_md_obd, NULL);
 
                 if (flags & OBD_OPT_FORCE) {
                         struct obd_device *lmv_obd;
                         struct obd_ioctl_data ioc_data = { 0 };
                         
-                        lmv_obd = class_exp2obd(mds->mds_lmv_exp);
+                        lmv_obd = class_exp2obd(mds->mds_md_exp);
                         if (lmv_obd == NULL)
                                 GOTO(out, rc = 0);
 
@@ -173,7 +173,7 @@ int mds_lmv_disconnect(struct obd_device *obd, int flags)
                          * it here. --umka.
                          */
                         lmv_obd->obd_no_recov = 1;
-                        obd_iocontrol(IOC_OSC_SET_ACTIVE, mds->mds_lmv_exp,
+                        obd_iocontrol(IOC_OSC_SET_ACTIVE, mds->mds_md_exp,
                                       sizeof(ioc_data), &ioc_data, NULL);
                 }
 
@@ -182,33 +182,33 @@ int mds_lmv_disconnect(struct obd_device *obd, int flags)
                  * disconnected by class_disconnect_exports()) then we just need
                  * to drop our ref.
                  */
-                mds->mds_lmv_connected = 0;
-                rc = obd_disconnect(mds->mds_lmv_exp, flags);
+                mds->mds_md_connected = 0;
+                rc = obd_disconnect(mds->mds_md_exp, flags);
                 if (rc)
-                        class_export_put(mds->mds_lmv_exp);
+                        class_export_put(mds->mds_md_exp);
 
         out:
-                mds->mds_lmv_exp = NULL;
-                mds->mds_lmv_obd = NULL;
+                mds->mds_md_exp = NULL;
+                mds->mds_md_obd = NULL;
         }
-        up(&mds->mds_lmv_sem);
+        up(&mds->mds_md_sem);
         RETURN(rc);
 }
 
-int mds_get_lmv_attr(struct obd_device *obd, struct inode *inode,
-                     struct mea **mea, int *mea_size)
+int mds_md_get_attr(struct obd_device *obd, struct inode *inode,
+                    struct mea **mea, int *mea_size)
 {
         struct mds_obd *mds = &obd->u.mds;
        int rc;
         ENTRY;
 
-       if (!mds->mds_lmv_obd)
+       if (!mds->mds_md_obd)
                RETURN(0);
         if (!S_ISDIR(inode->i_mode))
                 RETURN(0);
 
        /* first calculate mea size */
-        *mea_size = obd_alloc_diskmd(mds->mds_lmv_exp,
+        *mea_size = obd_alloc_diskmd(mds->mds_md_exp,
                                      (struct lov_mds_md **)mea);
         if (*mea_size < 0 || *mea == NULL)
                 return *mea_size < 0 ? *mea_size : -EINVAL;
@@ -358,7 +358,7 @@ static int flush_buffer_onto_mds(struct dirsplit_control *dc, int mdsnum)
                 ca->brwc.count = PAGE_SIZE;
                 ca->brwc.flag = 0;
                 ca->oa.o_mds = mdsnum;
-                rc = obd_brw(OBD_BRW_WRITE, mds->mds_lmv_exp, &ca->oa,
+                rc = obd_brw(OBD_BRW_WRITE, mds->mds_md_exp, &ca->oa,
                              (struct lov_stripe_md *) dc->mea,
                              1, &ca->brwc, NULL);
                 if (rc)
@@ -549,7 +549,7 @@ int mds_splitting_expected(struct obd_device *obd, struct dentry *dentry)
         int rc, size;
 
        /* clustered MD ? */
-       if (!mds->mds_lmv_obd)
+       if (!mds->mds_md_obd)
                return MDS_NO_SPLITTABLE;
 
         /* inode exist? */
@@ -572,7 +572,7 @@ int mds_splitting_expected(struct obd_device *obd, struct dentry *dentry)
         if (dentry->d_inode->i_size < MAX_DIR_SIZE)
                 return MDS_NO_SPLIT_EXPECTED;
 
-        mds_get_lmv_attr(obd, dentry->d_inode, &mea, &size);
+        mds_md_get_attr(obd, dentry->d_inode, &mea, &size);
         if (mea) {
                 /* already splitted or slave object: shouldn't be splitted */
                 rc = MDS_NO_SPLITTABLE;
@@ -622,13 +622,13 @@ int mds_try_to_split_dir(struct obd_device *obd, struct dentry *dentry,
 
         if (mea == NULL)
                 mea = &tmea;
-        mea_size = obd_size_diskmd(mds->mds_lmv_exp, NULL);
+        mea_size = obd_size_diskmd(mds->mds_md_exp, NULL);
 
         /* FIXME: Actually we may only want to allocate enough space for
          * necessary amount of stripes, but on the other hand with this
          * approach of allocating maximal possible amount of MDS slots,
          * it would be easier to split the dir over more MDSes */
-        rc = obd_alloc_diskmd(mds->mds_lmv_exp, (void *)mea);
+        rc = obd_alloc_diskmd(mds->mds_md_exp, (void *)mea);
         if (rc < 0) {
                 CERROR("obd_alloc_diskmd() failed, error %d.\n", rc);
                 RETURN(rc);
@@ -677,7 +677,7 @@ int mds_try_to_split_dir(struct obd_device *obd, struct dentry *dentry,
         CDEBUG(D_OTHER, "%s: create subdirs with mode %o, uid %u, gid %u\n",
                obd->obd_name, dir->i_mode, dir->i_uid, dir->i_gid);
                         
-        rc = obd_create(mds->mds_lmv_exp, oa,
+        rc = obd_create(mds->mds_md_exp, oa,
                         (struct lov_stripe_md **)mea, NULL);
         if (rc) {
                 CERROR("Can't create remote inode, rc = %d\n", rc);
@@ -717,7 +717,7 @@ int mds_try_to_split_dir(struct obd_device *obd, struct dentry *dentry,
        /* 3) read through the dir and distribute it over objects */
         rc = scan_and_distribute(obd, dentry, *mea);
        if (mea == &tmea)
-                obd_free_diskmd(mds->mds_lmv_exp, (struct lov_mds_md **)mea);
+                obd_free_diskmd(mds->mds_md_exp, (struct lov_mds_md **)mea);
         if (rc) {
                 CERROR("scan_and_distribute() failed, error %d.\n", rc);
                 RETURN(rc);
@@ -888,8 +888,8 @@ int mds_choose_mdsnum(struct obd_device *obd, const char *name, int len, int fla
 
         if (flags & REC_REINT_CREATE) { 
                 i = mds->mds_num;
-        } else if (mds->mds_lmv_exp) {
-                lmv = &mds->mds_lmv_exp->exp_obd->u.lmv;
+        } else if (mds->mds_md_exp) {
+                lmv = &mds->mds_md_exp->exp_obd->u.lmv;
                 i = raw_name2idx(MEA_MAGIC_LAST_CHAR, lmv->desc.ld_tgt_count, name, len);
         }
         RETURN(i);
@@ -911,15 +911,15 @@ int mds_lock_slave_objs(struct obd_device *obd, struct dentry *dentry,
         LASSERT(dentry->d_inode != NULL);
 
        /* clustered MD ? */
-       if (!mds->mds_lmv_obd)
+       if (!mds->mds_md_obd)
                RETURN(0);
 
         /* a dir can be splitted only */
         if (!S_ISDIR(dentry->d_inode->i_mode))
                 RETURN(0);
 
-        rc = mds_get_lmv_attr(obd, dentry->d_inode,
-                              &mea, &mea_size);
+        rc = mds_md_get_attr(obd, dentry->d_inode,
+                             &mea, &mea_size);
         if (rc)
                 RETURN(rc);
 
@@ -952,7 +952,7 @@ int mds_lock_slave_objs(struct obd_device *obd, struct dentry *dentry,
         op_data->mea1 = mea;
         it.it_op = IT_UNLINK;
 
-        rc = md_enqueue(mds->mds_lmv_exp, LDLM_IBITS, &it, LCK_EX,
+        rc = md_enqueue(mds->mds_md_exp, LDLM_IBITS, &it, LCK_EX,
                         op_data, *rlockh, NULL, 0, ldlm_completion_ast,
                         mds_blocking_ast, NULL);
         OBD_FREE(op_data, sizeof(*op_data));
@@ -975,10 +975,10 @@ void mds_unlock_slave_objs(struct obd_device *obd, struct dentry *dentry,
                 return;
         }
 
-       LASSERT(mds->mds_lmv_obd != NULL);
+       LASSERT(mds->mds_md_obd != NULL);
         LASSERT(S_ISDIR(dentry->d_inode->i_mode));
 
-        rc = mds_get_lmv_attr(obd, dentry->d_inode, &mea, &mea_size);
+        rc = mds_md_get_attr(obd, dentry->d_inode, &mea, &mea_size);
         if (rc) {
                 CERROR("locks are leaked\n");
                 EXIT;
@@ -1012,14 +1012,14 @@ int mds_unlink_slave_objs(struct obd_device *obd, struct dentry *dentry)
         ENTRY;
 
        /* clustered MD ? */
-       if (!mds->mds_lmv_obd)
+       if (!mds->mds_md_obd)
                RETURN(0);
 
         /* a dir can be splitted only */
         if (!S_ISDIR(dentry->d_inode->i_mode))
                 RETURN(0);
 
-        rc = mds_get_lmv_attr(obd, dentry->d_inode, &mea, &mea_size);
+        rc = mds_md_get_attr(obd, dentry->d_inode, &mea, &mea_size);
         if (rc)
                 RETURN(rc);
 
@@ -1039,7 +1039,7 @@ int mds_unlink_slave_objs(struct obd_device *obd, struct dentry *dentry)
         
         memset(op_data, 0, sizeof(*op_data));
         op_data->mea1 = mea;
-        rc = md_unlink(mds->mds_lmv_exp, op_data, &req);
+        rc = md_unlink(mds->mds_md_exp, op_data, &req);
         OBD_FREE(op_data, sizeof(*op_data));
         LASSERT(req == NULL);
         EXIT;
index 734dc16..fbb3076 100644 (file)
@@ -43,7 +43,7 @@ static int mds_llog_origin_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec,
                                struct rw_semaphore **lock, int *lock_count)
 {
         struct obd_device *obd = ctxt->loc_obd;
-        struct obd_device *lov_obd = obd->u.mds.mds_lov_obd;
+        struct obd_device *lov_obd = obd->u.mds.mds_dt_obd;
         struct llog_ctxt *lctxt;
         int rc;
         ENTRY;
@@ -59,7 +59,7 @@ static int mds_llog_origin_connect(struct llog_ctxt *ctxt, int count,
                                    struct llog_gen *gen, struct obd_uuid *uuid)
 {
         struct obd_device *obd = ctxt->loc_obd;
-        struct obd_device *lov_obd = obd->u.mds.mds_lov_obd;
+        struct obd_device *lov_obd = obd->u.mds.mds_dt_obd;
         struct llog_ctxt *lctxt;
         int rc;
         ENTRY;
@@ -74,7 +74,7 @@ static int mds_llog_repl_cancel(struct llog_ctxt *ctxt, int count,
                                 void *data)
 {
         struct obd_device *obd = ctxt->loc_obd;
-        struct obd_device *lov_obd = obd->u.mds.mds_lov_obd;
+        struct obd_device *lov_obd = obd->u.mds.mds_dt_obd;
         struct llog_ctxt *lctxt;
         int rc;
         ENTRY;
@@ -97,12 +97,12 @@ int mds_log_op_unlink(struct obd_device *obd, struct inode *inode,
         int lock_count = 0;
         ENTRY;
 
-        if (IS_ERR(mds->mds_lov_obd))
-                RETURN(PTR_ERR(mds->mds_lov_obd));
+        if (IS_ERR(mds->mds_dt_obd))
+                RETURN(PTR_ERR(mds->mds_dt_obd));
 
         RETURN(0);
 
-        rc = obd_unpackmd(mds->mds_lov_exp, &lsm, lmm, lmm_size);
+        rc = obd_unpackmd(mds->mds_dt_exp, &lsm, lmm, lmm_size);
         if (rc < 0)
                 RETURN(rc);
 
@@ -122,7 +122,7 @@ int mds_log_op_unlink(struct obd_device *obd, struct inode *inode,
                       cookies_size / sizeof(struct llog_cookie), NULL,
                       res ? &lcl->lcl_locks[0] : NULL, &lock_count);
 
-        obd_free_memmd(mds->mds_lov_exp, &lsm);
+        obd_free_memmd(mds->mds_dt_exp, &lsm);
 
         if (res && (rc <= 0 || lock_count == 0)) {
                 OBD_FREE(lcl, size);
@@ -144,7 +144,7 @@ static struct llog_operations mds_size_repl_logops = {
 int mds_llog_init(struct obd_device *obd, struct obd_llogs *llogs,
                   struct obd_device *tgt, int count, struct llog_catid *logid)
 {
-        struct obd_device *lov_obd = obd->u.mds.mds_lov_obd;
+        struct obd_device *lov_obd = obd->u.mds.mds_dt_obd;
         int rc;
         ENTRY;
 
@@ -167,7 +167,7 @@ int mds_llog_init(struct obd_device *obd, struct obd_llogs *llogs,
 
 int mds_llog_finish(struct obd_device *obd, struct obd_llogs *llogs, int count)
 {
-        struct obd_device *lov_obd = obd->u.mds.mds_lov_obd;
+        struct obd_device *lov_obd = obd->u.mds.mds_dt_obd;
         int rc;
         ENTRY;
 
index 6a412e5..1c31b1b 100644 (file)
@@ -55,70 +55,70 @@ void cpu_to_le_lov_desc (struct lov_desc *ld)
         ld->ld_pattern = cpu_to_le32 (ld->ld_pattern);
 }
 
-void mds_lov_update_objids(struct obd_device *obd, obd_id *ids)
+void mds_dt_update_objids(struct obd_device *obd, obd_id *ids)
 {
         struct mds_obd *mds = &obd->u.mds;
         int i;
         ENTRY;
 
-        spin_lock(&mds->mds_lov_lock);
-        for (i = 0; i < mds->mds_lov_desc.ld_tgt_count; i++)
-                if (ids[i] > (mds->mds_lov_objids)[i])
-                        (mds->mds_lov_objids)[i] = ids[i];
-        spin_unlock(&mds->mds_lov_lock);
+        spin_lock(&mds->mds_dt_lock);
+        for (i = 0; i < mds->mds_dt_desc.ld_tgt_count; i++)
+                if (ids[i] > (mds->mds_dt_objids)[i])
+                        (mds->mds_dt_objids)[i] = ids[i];
+        spin_unlock(&mds->mds_dt_lock);
         EXIT;
 }
 
-static int mds_lov_read_objids(struct obd_device *obd)
+static int mds_dt_read_objids(struct obd_device *obd)
 {
         struct mds_obd *mds = &obd->u.mds;
         obd_id *ids;
         loff_t off = 0;
-        int i, rc, size = mds->mds_lov_desc.ld_tgt_count * sizeof(*ids);
+        int i, rc, size = mds->mds_dt_desc.ld_tgt_count * sizeof(*ids);
         ENTRY;
 
-        if (mds->mds_lov_objids != NULL)
+        if (mds->mds_dt_objids != NULL)
                 RETURN(0);
 
         OBD_ALLOC(ids, size);
         if (ids == NULL)
                 RETURN(-ENOMEM);
-        mds->mds_lov_objids = ids;
+        mds->mds_dt_objids = ids;
 
-        if (mds->mds_lov_objid_filp->f_dentry->d_inode->i_size == 0)
+        if (mds->mds_dt_objid_filp->f_dentry->d_inode->i_size == 0)
                 RETURN(0);
-        rc = fsfilt_read_record(obd, mds->mds_lov_objid_filp, ids, size, &off);
+        rc = fsfilt_read_record(obd, mds->mds_dt_objid_filp, ids, size, &off);
         if (rc < 0) {
                 CERROR("Error reading objids %d\n", rc);
         } else {
-                mds->mds_lov_objids_valid = 1;
+                mds->mds_dt_objids_valid = 1;
                 rc = 0;
         }
 
-        for (i = 0; i < mds->mds_lov_desc.ld_tgt_count; i++)
+        for (i = 0; i < mds->mds_dt_desc.ld_tgt_count; i++)
                 CDEBUG(D_INFO, "read last object "LPU64" for idx %d\n",
-                       mds->mds_lov_objids[i], i);
+                       mds->mds_dt_objids[i], i);
 
         RETURN(rc);
 }
 
-int mds_lov_write_objids(struct obd_device *obd)
+int mds_dt_write_objids(struct obd_device *obd)
 {
         struct mds_obd *mds = &obd->u.mds;
         loff_t off = 0;
-        int i, rc, size = mds->mds_lov_desc.ld_tgt_count * sizeof(obd_id);
+        int i, rc, size = mds->mds_dt_desc.ld_tgt_count * sizeof(obd_id);
         ENTRY;
 
-        for (i = 0; i < mds->mds_lov_desc.ld_tgt_count; i++)
+        for (i = 0; i < mds->mds_dt_desc.ld_tgt_count; i++)
                 CDEBUG(D_INFO, "writing last object "LPU64" for idx %d\n",
-                       mds->mds_lov_objids[i], i);
+                       mds->mds_dt_objids[i], i);
 
-        rc = fsfilt_write_record(obd, mds->mds_lov_objid_filp,
-                                 mds->mds_lov_objids, size, &off, 0);
+        rc = fsfilt_write_record(obd, mds->mds_dt_objid_filp,
+                                 mds->mds_dt_objids, size, &off, 0);
         RETURN(rc);
 }
 
-int mds_lov_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid)
+int mds_dt_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid)
 {
         int rc;
         struct obdo *oa = NULL;
@@ -126,7 +126,7 @@ int mds_lov_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid)
         struct lov_stripe_md  *empty_ea = NULL;
         ENTRY;
 
-        LASSERT(mds->mds_lov_objids != NULL);
+        LASSERT(mds->mds_dt_objids != NULL);
 
         /*
          * this create will in fact either create or destroy: If the OST is
@@ -146,13 +146,13 @@ int mds_lov_clearorphans(struct mds_obd *mds, struct obd_uuid *ost_uuid)
                 memcpy(&oa->o_inline, ost_uuid, sizeof(*ost_uuid));
                 oa->o_valid |= OBD_MD_FLINLINE;
         }
-        rc = obd_create(mds->mds_lov_exp, oa, &empty_ea, &oti);
+        rc = obd_create(mds->mds_dt_exp, oa, &empty_ea, &oti);
         obdo_free(oa);
         RETURN(rc);
 }
 
 /* update the LOV-OSC knowledge of the last used object id's */
-int mds_lov_set_nextid(struct obd_device *obd)
+int mds_dt_set_nextid(struct obd_device *obd)
 {
         struct mds_obd *mds = &obd->u.mds;
         int rc;
@@ -160,119 +160,119 @@ int mds_lov_set_nextid(struct obd_device *obd)
 
         LASSERT(!obd->obd_recovering);
 
-        LASSERT(mds->mds_lov_objids != NULL);
+        LASSERT(mds->mds_dt_objids != NULL);
 
-        rc = obd_set_info(mds->mds_lov_exp, strlen("next_id"), "next_id",
-                          mds->mds_lov_desc.ld_tgt_count, mds->mds_lov_objids);
+        rc = obd_set_info(mds->mds_dt_exp, strlen("next_id"), "next_id",
+                          mds->mds_dt_desc.ld_tgt_count, mds->mds_dt_objids);
         RETURN(rc);
 }
 
 /* tell the LOV-OSC by how much to pre-create */
-int mds_lov_set_growth(struct mds_obd *mds, int count)
+int mds_dt_set_growth(struct mds_obd *mds, int count)
 {
         int rc;
         ENTRY;
 
-        rc = obd_set_info(mds->mds_lov_exp, strlen("growth_count"),
+        rc = obd_set_info(mds->mds_dt_exp, strlen("growth_count"),
                           "growth_count", sizeof(count), &count);
 
         RETURN(rc);
 }
 
-static int mds_lov_update_desc(struct obd_device *obd, struct obd_export *lov)
+static int mds_dt_update_desc(struct obd_device *obd, struct obd_export *lov)
 {
         struct mds_obd *mds = &obd->u.mds;
-        int valsize = sizeof(mds->mds_lov_desc), rc, i;
-        int old_count = mds->mds_lov_desc.ld_tgt_count;
+        int valsize = sizeof(mds->mds_dt_desc), rc, i;
+        int old_count = mds->mds_dt_desc.ld_tgt_count;
         ENTRY;
 
         rc = obd_get_info(lov, strlen("lovdesc") + 1, "lovdesc", &valsize,
-                          &mds->mds_lov_desc);
+                          &mds->mds_dt_desc);
         if (rc)
                 RETURN(rc);
 
         /* The size of the LOV target table may have increased. */
-        if (old_count >= mds->mds_lov_desc.ld_tgt_count) {
+        if (old_count >= mds->mds_dt_desc.ld_tgt_count) {
                 obd_id *ids;
                 int     size;
 
-                size = mds->mds_lov_desc.ld_tgt_count * sizeof(*ids);
+                size = mds->mds_dt_desc.ld_tgt_count * sizeof(*ids);
                 OBD_ALLOC(ids, size);
                 if (ids == NULL)
                         RETURN(-ENOMEM);
 
                 memset(ids, 0, size);
 
-                if (mds->mds_lov_objids != NULL) {
+                if (mds->mds_dt_objids != NULL) {
                         int oldsize = old_count * sizeof(*ids);
 
-                        memcpy(ids, mds->mds_lov_objids, oldsize);
-                        OBD_FREE(mds->mds_lov_objids, oldsize);
+                        memcpy(ids, mds->mds_dt_objids, oldsize);
+                        OBD_FREE(mds->mds_dt_objids, oldsize);
                 }
-                mds->mds_lov_objids = ids;
+                mds->mds_dt_objids = ids;
         }
 
-        i = lov_mds_md_size(mds->mds_lov_desc.ld_tgt_count);
+        i = lov_mds_md_size(mds->mds_dt_desc.ld_tgt_count);
         if (i > mds->mds_max_mdsize)
                 mds->mds_max_mdsize = i;
-        mds->mds_max_cookiesize = mds->mds_lov_desc.ld_tgt_count *
+        mds->mds_max_cookiesize = mds->mds_dt_desc.ld_tgt_count *
                                   sizeof(struct llog_cookie);
-        mds->mds_has_lov_desc = 1;
+        mds->mds_has_dt_desc = 1;
         RETURN(0);
 }
 
-int mds_lov_connect(struct obd_device *obd, char * lov_name)
+int mds_dt_connect(struct obd_device *obd, char * lov_name)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lustre_handle conn = {0,};
         int rc, i;
         ENTRY;
 
-        if (IS_ERR(mds->mds_lov_obd))
-                RETURN(PTR_ERR(mds->mds_lov_obd));
+        if (IS_ERR(mds->mds_dt_obd))
+                RETURN(PTR_ERR(mds->mds_dt_obd));
 
-        if (mds->mds_lov_obd)
+        if (mds->mds_dt_obd)
                 RETURN(0);
 
-        spin_lock_init(&mds->mds_lov_lock);
-        mds->mds_lov_obd = class_name2obd(lov_name);
-        if (!mds->mds_lov_obd) {
+        spin_lock_init(&mds->mds_dt_lock);
+        mds->mds_dt_obd = class_name2obd(lov_name);
+        if (!mds->mds_dt_obd) {
                 CERROR("MDS cannot locate LOV %s\n", lov_name);
-                mds->mds_lov_obd = ERR_PTR(-ENOTCONN);
+                mds->mds_dt_obd = ERR_PTR(-ENOTCONN);
                 RETURN(-ENOTCONN);
         }
 
         CDEBUG(D_HA, "obd: %s osc: %s lov_name: %s\n",
-               obd->obd_name, mds->mds_lov_obd->obd_name, lov_name);
+               obd->obd_name, mds->mds_dt_obd->obd_name, lov_name);
 
-        rc = obd_connect(&conn, mds->mds_lov_obd, &obd->obd_uuid,
+        rc = obd_connect(&conn, mds->mds_dt_obd, &obd->obd_uuid,
                          mds->mds_num + FILTER_GROUP_FIRST_MDS);
         if (rc) {
                 CERROR("MDS cannot connect to LOV %s (%d)\n", lov_name, rc);
-                mds->mds_lov_obd = ERR_PTR(rc);
+                mds->mds_dt_obd = ERR_PTR(rc);
                 RETURN(rc);
         }
-        mds->mds_lov_exp = class_conn2export(&conn);
+        mds->mds_dt_exp = class_conn2export(&conn);
 
-        rc = obd_register_observer(mds->mds_lov_obd, obd);
+        rc = obd_register_observer(mds->mds_dt_obd, obd);
         if (rc) {
                 CERROR("MDS cannot register as observer of LOV %s (%d)\n",
                        lov_name, rc);
                 GOTO(err_discon, rc);
         }
 
-        rc = mds_lov_update_desc(obd, mds->mds_lov_exp);
+        rc = mds_dt_update_desc(obd, mds->mds_dt_exp);
         if (rc)
                 GOTO(err_reg, rc);
 
-        rc = mds_lov_read_objids(obd);
+        rc = mds_dt_read_objids(obd);
         if (rc) {
                 CERROR("cannot read %s: rc = %d\n", "lov_objids", rc);
                 GOTO(err_reg, rc);
         }
 
         rc = obd_llog_cat_initialize(obd, &obd->obd_llogs, 
-                                     mds->mds_lov_desc.ld_tgt_count, CATLIST);
+                                     mds->mds_dt_desc.ld_tgt_count, CATLIST);
         if (rc) {
                 CERROR("failed to initialize catalog %d\n", rc);
                 GOTO(err_reg, rc);
@@ -280,16 +280,16 @@ int mds_lov_connect(struct obd_device *obd, char * lov_name)
 
         /* If we're mounting this code for the first time on an existing FS,
          * we need to populate the objids array from the real OST values */
-        if (!mds->mds_lov_objids_valid) {
-                int size = sizeof(obd_id) * mds->mds_lov_desc.ld_tgt_count;
-                rc = obd_get_info(mds->mds_lov_exp, strlen("last_id"),
-                                  "last_id", &size, mds->mds_lov_objids);
+        if (!mds->mds_dt_objids_valid) {
+                int size = sizeof(obd_id) * mds->mds_dt_desc.ld_tgt_count;
+                rc = obd_get_info(mds->mds_dt_exp, strlen("last_id"),
+                                  "last_id", &size, mds->mds_dt_objids);
                 if (!rc) {
-                        for (i = 0; i < mds->mds_lov_desc.ld_tgt_count; i++)
+                        for (i = 0; i < mds->mds_dt_desc.ld_tgt_count; i++)
                                 CWARN("got last object "LPU64" from OST %d\n",
-                                      mds->mds_lov_objids[i], i);
-                        mds->mds_lov_objids_valid = 1;
-                        rc = mds_lov_write_objids(obd);
+                                      mds->mds_dt_objids[i], i);
+                        mds->mds_dt_objids_valid = 1;
+                        rc = mds_dt_write_objids(obd);
                         if (rc)
                                 CERROR("got last objids from OSTs, but error "
                                        "writing objids file: %d\n", rc);
@@ -306,37 +306,37 @@ int mds_lov_connect(struct obd_device *obd, char * lov_name)
         RETURN(rc);
 
 err_reg:
-        obd_register_observer(mds->mds_lov_obd, NULL);
+        obd_register_observer(mds->mds_dt_obd, NULL);
 err_discon:
-        obd_disconnect(mds->mds_lov_exp, 0);
-        mds->mds_lov_exp = NULL;
-        mds->mds_lov_obd = ERR_PTR(rc);
+        obd_disconnect(mds->mds_dt_exp, 0);
+        mds->mds_dt_exp = NULL;
+        mds->mds_dt_obd = ERR_PTR(rc);
         return rc;
 }
 
-int mds_lov_disconnect(struct obd_device *obd, int flags)
+int mds_dt_disconnect(struct obd_device *obd, int flags)
 {
         struct mds_obd *mds = &obd->u.mds;
         int rc = 0;
         ENTRY;
 
-        if (!IS_ERR(mds->mds_lov_obd) && mds->mds_lov_exp != NULL) {
+        if (!IS_ERR(mds->mds_dt_obd) && mds->mds_dt_exp != NULL) {
                 /* cleanup all llogging subsystems */
                 rc = obd_llog_finish(obd, &obd->obd_llogs,
-                                     mds->mds_lov_desc.ld_tgt_count);
+                                     mds->mds_dt_desc.ld_tgt_count);
                 if (rc)
                         CERROR("failed to cleanup llogging subsystems\n");
 
-                obd_register_observer(mds->mds_lov_obd, NULL);
+                obd_register_observer(mds->mds_dt_obd, NULL);
 
-                rc = obd_disconnect(mds->mds_lov_exp, flags);
+                rc = obd_disconnect(mds->mds_dt_exp, flags);
                 /* if obd_disconnect fails (probably because the
                  * export was disconnected by class_disconnect_exports)
                  * then we just need to drop our ref. */
                 if (rc != 0)
-                        class_export_put(mds->mds_lov_exp);
-                mds->mds_lov_exp = NULL;
-                mds->mds_lov_obd = NULL;
+                        class_export_put(mds->mds_dt_exp);
+                mds->mds_dt_exp = NULL;
+                mds->mds_dt_obd = NULL;
         }
 
         RETURN(rc);
@@ -481,7 +481,7 @@ int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
         }
 
         case OBD_IOC_CATLOGLIST: {
-                int count = mds->mds_lov_desc.ld_tgt_count;
+                int count = mds->mds_dt_desc.ld_tgt_count;
                 rc = llog_catalog_list(obd, count, data);
                 RETURN(rc);
 
@@ -495,16 +495,16 @@ int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                 __u32 group;
 
                 obd_llog_finish(obd, &obd->obd_llogs,
-                                mds->mds_lov_desc.ld_tgt_count);
+                                mds->mds_dt_desc.ld_tgt_count);
                 push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
                 rc = llog_ioctl(ctxt, cmd, data);
                 pop_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
                 obd_llog_cat_initialize(obd, &obd->obd_llogs, 
-                                        mds->mds_lov_desc.ld_tgt_count,
+                                        mds->mds_dt_desc.ld_tgt_count,
                                         CATLIST);
                 group = FILTER_GROUP_FIRST_MDS + mds->mds_num;
                 valsize = sizeof(group);
-                rc2 = obd_set_info(mds->mds_lov_exp, strlen("mds_conn"),
+                rc2 = obd_set_info(mds->mds_dt_exp, strlen("mds_conn"),
                                    "mds_conn", valsize, &group);
                 if (!rc)
                         rc = rc2;
@@ -555,15 +555,15 @@ int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
 }
 
-struct mds_lov_sync_info {
+struct mds_dt_sync_info {
         struct obd_device *mlsi_obd;      /* the mds to sync */
         struct obd_device *mlsi_watched;  /* new lov target */
-        int                mlsi_index;    /* index into mds_lov_objids */ 
+        int                mlsi_index;    /* index into mds_dt_objids */ 
 };
 
-int mds_lov_synchronize(void *data)
+int mds_dt_synchronize(void *data)
 {
-        struct mds_lov_sync_info *mlsi = data;
+        struct mds_dt_sync_info *mlsi = data;
         struct llog_ctxt *ctxt;
         struct obd_device *obd;
         struct obd_device *watched;
@@ -608,13 +608,13 @@ int mds_lov_synchronize(void *data)
         if (rc)
                 RETURN(rc);
 
-        old_count = mds->mds_lov_desc.ld_tgt_count;
+        old_count = mds->mds_dt_desc.ld_tgt_count;
 
-        rc = mds_lov_update_desc(obd, mds->mds_lov_exp);
+        rc = mds_dt_update_desc(obd, mds->mds_dt_exp);
         if (rc)
                 RETURN(rc);
 
-        count = mds->mds_lov_desc.ld_tgt_count;
+        count = mds->mds_dt_desc.ld_tgt_count;
         LASSERT(count >= old_count);
 
         vallen = sizeof(vals[1]);
@@ -624,8 +624,8 @@ int mds_lov_synchronize(void *data)
                 RETURN(rc);
 
         vals[0] = index;
-        rc = mds_lov_set_info(obd->obd_self_export, strlen("next_id"),
-                              "next_id", 2, vals);
+        rc = mds_dt_set_info(obd->obd_self_export, strlen("next_id"),
+                             "next_id", 2, vals);
         if (rc)
                 RETURN(rc);
 
@@ -645,9 +645,9 @@ int mds_lov_synchronize(void *data)
         CWARN("MDS %s: %s now active, resetting orphans\n",
               obd->obd_name, uuid->uuid);
 
-        rc = mds_lov_clearorphans(&obd->u.mds, uuid);
+        rc = mds_dt_clearorphans(&obd->u.mds, uuid);
         if (rc != 0) {
-                CERROR("%s: failed at mds_lov_clearorphans: %d\n", 
+                CERROR("%s: failed at mds_dt_clearorphans(): %d\n", 
                        obd->obd_name, rc);
                 RETURN(rc);
         }
@@ -655,10 +655,11 @@ int mds_lov_synchronize(void *data)
         RETURN(0);
 }
 
-int mds_lov_start_synchronize(struct obd_device *obd,
-                              struct obd_device *watched, void *data)
+int mds_dt_start_synchronize(struct obd_device *obd,
+                             struct obd_device *watched, 
+                            void *data)
 {
-        struct mds_lov_sync_info *mlsi;
+        struct mds_dt_sync_info *mlsi;
         int rc;
         
         ENTRY;
@@ -671,12 +672,12 @@ int mds_lov_start_synchronize(struct obd_device *obd,
         mlsi->mlsi_watched = watched;
         mlsi->mlsi_index = (int)data;
 
-        rc = kernel_thread(mds_lov_synchronize, mlsi, CLONE_VM | CLONE_FILES);
+        rc = kernel_thread(mds_dt_synchronize, mlsi, CLONE_VM | CLONE_FILES);
         if (rc < 0)
-                CERROR("%s: error starting mds_lov_synchronize: %d\n", 
+                CERROR("%s: error starting mds_dt_synchronize(): %d\n", 
                        obd->obd_name, rc);
         else {
-                CDEBUG(D_HA, "%s: mds_lov_synchronize thread: %d\n", 
+                CDEBUG(D_HA, "%s: mds_dt_synchronize() thread: %d\n", 
                        obd->obd_name, rc);
                 rc = 0;
         }
@@ -709,13 +710,13 @@ int mds_notify(struct obd_device *obd, struct obd_device *watched,
                 CWARN("MDS %s: in recovery, not resetting orphans on %s\n",
                       obd->obd_name, uuid->uuid);
         } else {
-                rc = mds_lov_start_synchronize(obd, watched, data);
+                rc = mds_dt_start_synchronize(obd, watched, data);
         }
         RETURN(rc);
 }
 
-int mds_lov_set_info(struct obd_export *exp, obd_count keylen,
-                     void *key, obd_count vallen, void *val)
+int mds_dt_set_info(struct obd_export *exp, obd_count keylen,
+                    void *key, obd_count vallen, void *val)
 {
         struct obd_device *obd = class_exp2obd(exp);
         struct mds_obd *mds = &obd->u.mds;
@@ -734,21 +735,21 @@ int mds_lov_set_info(struct obd_export *exp, obd_count keylen,
                         RETURN(-EINVAL);
 
                 idx = *id;
-                if ((idx != *id) || (idx >= mds->mds_lov_desc.ld_tgt_count))
+                if ((idx != *id) || (idx >= mds->mds_dt_desc.ld_tgt_count))
                         RETURN(-EINVAL);
 
                 CDEBUG(D_CONFIG, "idx: %d id: %llu\n", idx, *(id + 1));
 
-                mds->mds_lov_objids[idx] = *++id;
+                mds->mds_dt_objids[idx] = *++id;
                 CDEBUG(D_CONFIG, "objid: %d: %lld\n", idx, *id);
                 /* XXX - should we be writing this out here ? */
-                RETURN(mds_lov_write_objids(obd));
+                RETURN(mds_dt_write_objids(obd));
         }
 
         RETURN(-EINVAL);
 }
 
-int mds_lov_update_config(struct obd_device *obd, int clean)
+int mds_dt_update_config(struct obd_device *obd, int clean)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct lvfs_run_ctxt saved;
@@ -762,7 +763,7 @@ int mds_lov_update_config(struct obd_device *obd, int clean)
                 RETURN(0);
 
         cfg.cfg_instance = NULL;
-        cfg.cfg_uuid = mds->mds_lov_uuid;
+        cfg.cfg_uuid = mds->mds_dt_uuid;
 
         namelen = strlen(profile) + 20; /* -clean-######### */
         OBD_ALLOC(name, namelen);
@@ -816,11 +817,11 @@ int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
 
         CDEBUG(D_INODE, "converting LOV EA on %lu/%u from V0 to V1\n",      
                 inode->i_ino, inode->i_generation);
-        rc = obd_unpackmd(obd->u.mds.mds_lov_exp, &lsm, lmm, lmm_size);
+        rc = obd_unpackmd(obd->u.mds.mds_dt_exp, &lsm, lmm, lmm_size);
         if (rc < 0)
                 GOTO(conv_end, rc);
 
-        rc = obd_packmd(obd->u.mds.mds_lov_exp, &lmm, lsm);
+        rc = obd_packmd(obd->u.mds.mds_dt_exp, &lmm, lsm);
         if (rc < 0)
                 GOTO(conv_free, rc);
         lmm_size = rc;
@@ -838,7 +839,7 @@ int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
                 rc = err ? err : lmm_size;
         GOTO(conv_free, rc);
 conv_free:
-        obd_free_memmd(obd->u.mds.mds_lov_exp, &lsm);
+        obd_free_memmd(obd->u.mds.mds_dt_exp, &lsm);
 conv_end:
         return rc;
 }
@@ -848,7 +849,7 @@ int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
                           struct lustre_msg *msg, int offset)
 {
         struct mds_obd *mds = &obd->u.mds;
-        struct obd_export *lov_exp = mds->mds_lov_exp;
+        struct obd_export *dt_exp = mds->mds_dt_exp;
         struct lov_mds_md *lmm= NULL;
         struct lov_stripe_md *lsm = NULL;
         struct obdo *oa = NULL;
@@ -872,7 +873,7 @@ int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
         }
         lmm_size = msg->buflens[offset];
 
-        rc = obd_unpackmd(lov_exp, &lsm, lmm, lmm_size);
+        rc = obd_unpackmd(dt_exp, &lsm, lmm, lmm_size);
         if (rc < 0)
                 RETURN(0);
 
@@ -897,7 +898,7 @@ int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
                 OBD_MD_FLCTIME;
         obdo_from_inode(oa, inode, valid);
 
-        rc = obd_revalidate_md(lov_exp, oa, lsm, &oti);
+        rc = obd_revalidate_md(dt_exp, oa, lsm, &oti);
         if (rc == 0)
                 GOTO(out_oa, rc);
         if (rc < 0) {
@@ -906,7 +907,7 @@ int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
                 GOTO(out_oa, rc);
         }
 
-        rc = obd_packmd(lov_exp, &lmm, lsm);
+        rc = obd_packmd(dt_exp, &lmm, lsm);
         if (rc < 0)
                 GOTO(out_oa, rc);
         lmm_size = rc;
@@ -926,6 +927,6 @@ int mds_revalidate_lov_ea(struct obd_device *obd, struct inode *inode,
 out_oa:
         obdo_free(oa);
 out_lsm:
-        obd_free_memmd(lov_exp, &lsm);
+        obd_free_memmd(dt_exp, &lsm);
         return rc;
 }
index 89e8648..2209c17 100644 (file)
@@ -330,7 +330,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
         if (body->valid & OBD_MD_FLEASIZE)
                 RETURN(0);
 
-        OBD_ALLOC(*ids, mds->mds_lov_desc.ld_tgt_count * sizeof(**ids));
+        OBD_ALLOC(*ids, mds->mds_dt_desc.ld_tgt_count * sizeof(**ids));
         if (*ids == NULL)
                 RETURN(-ENOMEM);
         oti.oti_objid = *ids;
@@ -351,7 +351,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                         GOTO(out_oa, rc);
                 }
 
-                mds_objids_from_lmm(*ids, lmm, &mds->mds_lov_desc);
+                mds_objids_from_lmm(*ids, lmm, &mds->mds_dt_desc);
 
                 lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, 0);
                 lmm_bufsize = req->rq_repmsg->buflens[offset];
@@ -387,7 +387,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                 /* check if things like lfs setstripe are sending us the ea */
                 if (rec->ur_flags & MDS_OPEN_HAS_EA) {
                         rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE,
-                                           mds->mds_lov_exp,
+                                           mds->mds_dt_exp,
                                            0, &lsm, rec->ur_eadata);
                         if (rc)
                                 GOTO(out_oa, rc);
@@ -397,7 +397,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                          * striping for CMD. -p */
                 } 
                 LASSERT(oa->o_gr >= FILTER_GROUP_FIRST_MDS);
-                rc = obd_create(mds->mds_lov_exp, oa, &lsm, &oti);
+                rc = obd_create(mds->mds_dt_exp, oa, &lsm, &oti);
                 if (rc) {
                         int level = D_ERROR;
                         if (rc == -ENOSPC)
@@ -413,7 +413,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                         GOTO(out_oa, rc);
                 }
         } else {
-                rc = obd_iocontrol(OBD_IOC_LOV_SETEA, mds->mds_lov_exp,
+                rc = obd_iocontrol(OBD_IOC_LOV_SETEA, mds->mds_dt_exp,
                                    0, &lsm, rec->ur_eadata);
                 if (rc) {
                         GOTO(out_oa, rc);
@@ -425,7 +425,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                 oa->o_size = inode->i_size;
                 obdo_from_inode(oa, inode, OBD_MD_FLTYPE|OBD_MD_FLATIME|
                                 OBD_MD_FLMTIME| OBD_MD_FLCTIME| OBD_MD_FLSIZE);
-                rc = obd_setattr(mds->mds_lov_exp, oa, lsm, &oti);
+                rc = obd_setattr(mds->mds_dt_exp, oa, lsm, &oti);
                 if (rc) {
                         CERROR("error setting attrs for inode %lu: rc %d\n",
                                inode->i_ino, rc);
@@ -442,9 +442,9 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
 
         LASSERT(lsm && lsm->lsm_object_id);
         lmm = NULL;
-        rc = obd_packmd(mds->mds_lov_exp, &lmm, lsm);
+        rc = obd_packmd(mds->mds_dt_exp, &lmm, lsm);
         if (!id_ino(rec->ur_id2))
-                obd_free_memmd(mds->mds_lov_exp, &lsm);
+                obd_free_memmd(mds->mds_dt_exp, &lsm);
         LASSERT(rc >= 0);
         lmm_size = rc;
         body->eadatasize = rc;
@@ -464,13 +464,13 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
         LASSERT(lmm_bufsize >= lmm_size);
 
         memcpy(lmm_buf, lmm, lmm_size);
-        obd_free_diskmd(mds->mds_lov_exp, &lmm);
+        obd_free_diskmd(mds->mds_dt_exp, &lmm);
  out_oa:
         oti_free_cookies(&oti);
         obdo_free(oa);
  out_ids:
         if (rc) {
-                OBD_FREE(*ids, mds->mds_lov_desc.ld_tgt_count * sizeof(**ids));
+                OBD_FREE(*ids, mds->mds_dt_desc.ld_tgt_count * sizeof(**ids));
                 *ids = NULL;
         }
         RETURN(rc);
@@ -682,8 +682,8 @@ static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild,
         CDEBUG(D_INODE, "mfd %p, cookie "LPX64"\n", mfd,
                mfd->mfd_handle.h_cookie);
         if (ids != NULL) {
-                mds_lov_update_objids(obd, ids);
-                OBD_FREE(ids, sizeof(*ids) * mds->mds_lov_desc.ld_tgt_count);
+                mds_dt_update_objids(obd, ids);
+                OBD_FREE(ids, sizeof(*ids) * mds->mds_dt_desc.ld_tgt_count);
         }
         //if (rc)
         //        mds_mfd_destroy(mfd);
@@ -937,7 +937,7 @@ int mds_open(struct mds_update_record *rec, int offset,
         cleanup_phase = 1; /* parent dentry and lock */
 
         /* try to retrieve MEA data for this dir */
-        rc = mds_get_lmv_attr(obd, dparent->d_inode, &mea, &mea_size);
+        rc = mds_md_get_attr(obd, dparent->d_inode, &mea, &mea_size);
         if (rc)
                 GOTO(cleanup, rc);
        
@@ -1133,7 +1133,6 @@ got_child:
                  * we do not read fid from EA here, because it is already
                  * updated and thus we avoid not needed IO, locking, etc.
                  */
-                body->valid |= OBD_MD_FID;
                 mds_pack_inode2body(obd, body, dchild->d_inode, 0);
         } else {
                 mds_pack_inode2body(obd, body, dchild->d_inode, 1);
index 9d7cfbc..69df665 100644 (file)
@@ -66,7 +66,7 @@ static void mds_cancel_cookies_cb(struct obd_device *obd,
         CDEBUG(D_HA, "cancelling %d cookies\n",
                (int)(mlcd->mlcd_cookielen / sizeof(*mlcd->mlcd_cookies)));
 
-        rc = obd_unpackmd(obd->u.mds.mds_lov_exp, &lsm, mlcd->mlcd_lmm,
+        rc = obd_unpackmd(obd->u.mds.mds_dt_exp, &lsm, mlcd->mlcd_lmm,
                           mlcd->mlcd_eadatalen);
         if (rc < 0) {
                 CERROR("bad LSM cancelling %d log cookies: rc %d\n",
@@ -165,7 +165,7 @@ int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle,
                         rc = err;
         }
                 
-        err = mds_lov_write_objids(obd);
+        err = mds_dt_write_objids(obd);
         if (err) {
                 log_pri = D_ERROR;
                 if (rc == 0)
@@ -451,12 +451,12 @@ static int mds_reint_setattr(struct mds_update_record *rec, int offset,
                 if (rc < 0)
                         GOTO(cleanup, rc);
 
-                rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE, mds->mds_lov_exp,
+                rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE, mds->mds_dt_exp,
                                    0, &lsm, rec->ur_eadata);
                 if (rc)
                         GOTO(cleanup, rc);
 
-                obd_free_memmd(mds->mds_lov_exp, &lsm);
+                obd_free_memmd(mds->mds_dt_exp, &lsm);
 
                 rc = fsfilt_set_md(obd, inode, handle, rec->ur_eadata,
                                    rec->ur_eadatalen);
@@ -476,7 +476,7 @@ static int mds_reint_setattr(struct mds_update_record *rec, int offset,
         if (rec->ur_iattr.ia_valid & (ATTR_ATIME | ATTR_ATIME_SET))
                 body->valid |= OBD_MD_FLATIME;
 
-        if (rc == 0 && rec->ur_cookielen && !IS_ERR(mds->mds_lov_obd)) {
+        if (rc == 0 && rec->ur_cookielen && !IS_ERR(mds->mds_dt_obd)) {
                 OBD_ALLOC(mlcd, sizeof(*mlcd) + rec->ur_cookielen +
                           rec->ur_eadatalen);
                 if (mlcd) {
@@ -614,7 +614,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
         ldlm_lock_dump_handle(D_OTHER, lockh);
 
         /* try to retrieve MEA data for this dir */
-        rc = mds_get_lmv_attr(obd, dparent->d_inode, &mea, &mea_size);
+        rc = mds_md_get_attr(obd, dparent->d_inode, &mea, &mea_size);
         if (rc)
                 GOTO(cleanup, rc);
 
@@ -810,7 +810,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
                          * before obd_create() is called, o_fid is not known if
                          * this is not recovery of cause.
                          */
-                        rc = obd_create(mds->mds_lmv_exp, oa, NULL, NULL);
+                        rc = obd_create(mds->mds_md_exp, oa, NULL, NULL);
                         if (rc) {
                                 CERROR("can't create remote inode: %d\n", rc);
                                 DEBUG_REQ(D_ERROR, req, "parent "LPU64"/%u name %s mode %o",
@@ -844,8 +844,7 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
                         /* fill reply */
                         body = lustre_msg_buf(req->rq_repmsg,
                                               0, sizeof(*body));
-                        body->valid |= OBD_MD_FLID | OBD_MD_MDS |
-                                OBD_MD_FID;
+                        body->valid |= OBD_MD_FLID | OBD_MD_MDS;
 
                         obdo2id(&body->id1, oa);
                        obdo_free(oa);
@@ -1836,7 +1835,7 @@ static int mds_reint_unlink_remote(struct mds_update_record *rec,
         if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY)
                 op_data->create_mode |= MDS_MODE_REPLAY;
         
-        rc = md_unlink(mds->mds_lmv_exp, op_data, &request);
+        rc = md_unlink(mds->mds_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         cleanup_phase = 2;
 
@@ -2123,7 +2122,7 @@ cleanup:
         rc = mds_finish_transno(mds, dparent ? dparent->d_inode : NULL,
                                 handle, req, rc, 0);
         if (!rc)
-                (void)obd_set_info(mds->mds_lov_exp, strlen("unlinked"),
+                (void)obd_set_info(mds->mds_dt_exp, strlen("unlinked"),
                                    "unlinked", 0, NULL);
         switch(cleanup_phase) {
         case 5: /* pending_dir semaphore */
@@ -2282,7 +2281,7 @@ static int mds_reint_link_to_remote(struct mds_update_record *rec,
         op_data->id1 = *(rec->ur_id1);
         op_data->namelen = 0;
         op_data->name = NULL;
-        rc = md_link(mds->mds_lmv_exp, op_data, &request);
+        rc = md_link(mds->mds_md_exp, op_data, &request);
         OBD_FREE(op_data, sizeof(*op_data));
         if (rc)
                 GOTO(cleanup, rc);
@@ -2832,7 +2831,7 @@ static int mds_check_for_rename(struct obd_device *obd,
                 mds_pack_dentry2id(obd, &op_data->id1, dentry, 1);
 
                 it.it_op = IT_UNLINK;
-                rc = md_enqueue(mds->mds_lmv_exp, LDLM_IBITS, &it, LCK_EX,
+                rc = md_enqueue(mds->mds_md_exp, LDLM_IBITS, &it, LCK_EX,
                                 op_data, rlockh, NULL, 0, ldlm_completion_ast,
                                 mds_blocking_ast, NULL);
                 OBD_FREE(op_data, sizeof(*op_data));
@@ -3098,7 +3097,7 @@ static int mds_reint_rename_to_remote(struct mds_update_record *rec, int offset,
         }
 
         op_data->id2 = *rec->ur_id2;
-        rc = md_rename(mds->mds_lmv_exp, op_data, NULL, 0,
+        rc = md_rename(mds->mds_md_exp, op_data, NULL, 0,
                        rec->ur_tgt, rec->ur_tgtlen - 1, &req2);
         OBD_FREE(op_data, sizeof(*op_data));
        
index 3f9e111..9b023f9 100644 (file)
@@ -56,7 +56,7 @@ static int mds_osc_destroy_orphan(struct mds_obd *mds,
         if (lmm_size == 0)
                 RETURN(0);
 
-        rc = obd_unpackmd(mds->mds_lov_exp, &lsm, lmm, lmm_size);
+        rc = obd_unpackmd(mds->mds_dt_exp, &lsm, lmm, lmm_size);
         if (rc < 0) {
                 CERROR("Error unpack md %p\n", lmm);
                 RETURN(rc);
@@ -78,13 +78,13 @@ static int mds_osc_destroy_orphan(struct mds_obd *mds,
                 oti.oti_logcookies = logcookies;
         }
 
-        rc = obd_destroy(mds->mds_lov_exp, oa, lsm, &oti);
+        rc = obd_destroy(mds->mds_dt_exp, oa, lsm, &oti);
         obdo_free(oa);
         if (rc)
                 CDEBUG(D_INODE, "destroy orphan objid 0x"LPX64" on ost error "
                        "%d\n", lsm->lsm_object_id, rc);
 out_free_memmd:
-        obd_free_memmd(mds->mds_lov_exp, &lsm);
+        obd_free_memmd(mds->mds_dt_exp, &lsm);
         RETURN(rc);
 }
 
@@ -99,7 +99,7 @@ static int mds_unlink_orphan(struct obd_device *obd, struct dentry *dchild,
         int rc, err;
         ENTRY;
 
-        LASSERT(mds->mds_lov_obd != NULL);
+        LASSERT(mds->mds_dt_obd != NULL);
 
         OBD_ALLOC(lmm, mds->mds_max_mdsize);
         if (lmm == NULL)
index 86f4824..47d25c1 100644 (file)
@@ -498,7 +498,7 @@ static int llog_catinfo_deletions(struct obd_device *obd, char *buf,
         if (ctxt == NULL || mds == NULL)
                 RETURN(-EOPNOTSUPP);
 
-        count = mds->mds_lov_desc.ld_tgt_count;
+        count = mds->mds_dt_desc.ld_tgt_count;
         size = sizeof(*idarray) * count;
 
         OBD_ALLOC(idarray, size);
index be3449c..cbe3d2a 100644 (file)
@@ -5,7 +5,9 @@ TMP=${TMP:-/tmp}
 MDS=`find /proc/fs/lustre/mds/* -type d | head -n1 | sed 's/.*\///'`
 [ -z "$MDS" ] && echo "no MDS available, skipping llog test" && exit 0
 
-insmod ../obdclass/llog_test.o || exit 1
+test "x$(uname -r | grep -o "2.6")" = "x2.6" && MODEXT=ko || MODEXT=o
+
+insmod ../obdclass/llog_test.$MODEXT || exit 1
 lctl modules > $TMP/ogdb-`hostname`
 
 # take care of UML developers