Whamcloud - gitweb
- cleanups about getattr_name. By now getattr_lock is used everywhere.
authoryury <yury>
Sat, 13 Nov 2004 15:39:39 +0000 (15:39 +0000)
committeryury <yury>
Sat, 13 Nov 2004 15:39:39 +0000 (15:39 +0000)
- more cleanups about EXIT, RETURN, etc.

16 files changed:
lustre/cobd/cache_obd.c
lustre/include/linux/lustre_mds.h
lustre/include/linux/obd.h
lustre/include/linux/obd_class.h
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/llite_mmap.c
lustre/llite/namei.c
lustre/llite/rw.c
lustre/llite/super25.c
lustre/lmv/lmv_obd.c
lustre/mdc/mdc_request.c
lustre/mds/handler.c
lustre/mds/lproc_mds.c
lustre/mds/mds_internal.h

index a081fc1..622b4b4 100644 (file)
@@ -879,7 +879,7 @@ static int cobd_md_change_cbdata(struct obd_export *exp, struct lustre_id *id,
         return md_change_cbdata(cobd_exp, id, it, data);
 }
 
-static int cobd_md_getattr_name(struct obd_export *exp, struct lustre_id *id,
+static int cobd_md_getattr_lock(struct obd_export *exp, struct lustre_id *id,
                                 char *filename, int namelen, unsigned long valid,
                                 unsigned int ea_size, struct ptlrpc_request **request)
 {
@@ -892,7 +892,7 @@ static int cobd_md_getattr_name(struct obd_export *exp, struct lustre_id *id,
                 return -EINVAL;
         }
         cobd_exp = cobd_get_exp(obd);
-        return md_getattr_name(cobd_exp, id, filename, namelen, valid,
+        return md_getattr_lock(cobd_exp, id, filename, namelen, valid,
                                ea_size, request);
 }
 
@@ -1244,7 +1244,7 @@ struct md_ops cobd_md_ops = {
         .m_getattr              = cobd_md_getattr,
         .m_req2lustre_md        = cobd_md_req2lustre_md,
         .m_change_cbdata        = cobd_md_change_cbdata,
-        .m_getattr_name         = cobd_md_getattr_name,
+        .m_getattr_lock         = cobd_md_getattr_lock,
         .m_create               = cobd_md_create,
         .m_unlink               = cobd_md_unlink,
         .m_valid_attrs          = cobd_md_valid_attrs,
index 6379016..8c10374 100644 (file)
@@ -226,7 +226,7 @@ int mdc_getstatus(struct obd_export *exp, struct lustre_id *rootid);
 int mdc_getattr(struct obd_export *exp, struct lustre_id *id,
                 unsigned long valid, unsigned int ea_size,
                 struct ptlrpc_request **request);
-int mdc_getattr_name(struct obd_export *exp, struct lustre_id *id,
+int mdc_getattr_lock(struct obd_export *exp, struct lustre_id *id,
                      char *filename, int namelen, unsigned long valid,
                      unsigned int ea_size, struct ptlrpc_request **request);
 int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data,
index fdeeb97..80e0f0f 100644 (file)
@@ -848,7 +848,7 @@ struct md_ops {
         int (*m_getattr)(struct obd_export *, struct lustre_id *,
                          unsigned long, unsigned int,
                          struct ptlrpc_request **);
-        int (*m_getattr_name)(struct obd_export *, struct lustre_id *,
+        int (*m_getattr_lock)(struct obd_export *, struct lustre_id *,
                               char *, int, unsigned long,
                               unsigned int, struct ptlrpc_request **);
         int (*m_intent_lock)(struct obd_export *,
index c4c0a19..d03a58d 100644 (file)
@@ -1330,16 +1330,16 @@ static inline int md_enqueue(struct obd_export *exp, int lock_type,
         RETURN(rc);
 }
 
-static inline int md_getattr_name(struct obd_export *exp, struct lustre_id *id,
+static inline int md_getattr_lock(struct obd_export *exp, struct lustre_id *id,
                                   char *filename, int namelen,
                                   unsigned long valid, unsigned int ea_size,
                                   struct ptlrpc_request **request)
 {
         int rc;
         ENTRY;
-        EXP_CHECK_MD_OP(exp, getattr_name);
-        MD_COUNTER_INCREMENT(exp->exp_obd, getattr_name);
-        rc = MDP(exp->exp_obd, getattr_name)(exp, id, filename, namelen,
+        EXP_CHECK_MD_OP(exp, getattr_lock);
+        MD_COUNTER_INCREMENT(exp->exp_obd, getattr_lock);
+        rc = MDP(exp->exp_obd, getattr_lock)(exp, id, filename, namelen,
                                              valid, ea_size, request);
         RETURN(rc);
 }
index b2f5912..7d0bbcc 100644 (file)
@@ -364,11 +364,12 @@ int ll_readdir(struct file * filp, void * dirent, filldir_t filldir)
                 ext2_put_page(page);
         }
 
+        EXIT;
 done:
         filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset;
         filp->f_version = inode->i_version;
         update_atime(inode);
-        RETURN(rc);
+        return rc;
 }
 
 static int ll_mkdir_stripe(struct inode *inode, unsigned long arg)
@@ -393,7 +394,7 @@ static int ll_mkdir_stripe(struct inode *inode, unsigned long arg)
                 RETURN(-ENOMEM);
 
         if (copy_from_user(name, lums.lums_name, lums.lums_namelen))
-                GOTO(out, err=-EFAULT);
+                GOTO(out, err = -EFAULT);
 
         CDEBUG(D_VFSTRACE, "ioctl Op:name=%s,dir=%lu/%u(%p)\n",
                name, inode->i_ino, inode->i_generation, inode);
@@ -405,10 +406,10 @@ static int ll_mkdir_stripe(struct inode *inode, unsigned long arg)
         err = md_create(sbi->ll_lmv_exp, &op_data, &nstripes, sizeof(nstripes),
                         mode, current->fsuid, current->fsgid, 0, &request);
         ptlrpc_req_finished(request);
-
+        EXIT;
 out:
         OBD_FREE(name, lums.lums_namelen);
-        RETURN(err);
+        return err;
 }
 
 static int ll_dir_ioctl(struct inode *inode, struct file *file,
@@ -452,10 +453,10 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
 
                 valid = OBD_MD_FLID;
                 ll_inode2id(&id, inode);
-                rc = md_getattr_name(sbi->ll_lmv_exp, &id,
+                rc = md_getattr_lock(sbi->ll_lmv_exp, &id,
                                      filename, namelen, valid, 0, &request);
                 if (rc < 0) {
-                        CDEBUG(D_INFO, "md_getattr_name: %d\n", rc);
+                        CDEBUG(D_INFO, "md_getattr_lock: %d\n", rc);
                         GOTO(out, rc);
                 }
 
@@ -522,8 +523,8 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 }
 
                 body = lustre_msg_buf(request->rq_repmsg, 0, sizeof(*body));
-                LASSERT(body != NULL);         /* checked by md_getattr_name */
-                LASSERT_REPSWABBED(request, 0);/* swabbed by md_getattr_name */
+                LASSERT(body != NULL);         /* checked by md_getattr_lock */
+                LASSERT_REPSWABBED(request, 0);/* swabbed by md_getattr_lock */
 
                 lmmsize = body->eadatasize;
                 if (lmmsize == 0)
@@ -580,19 +581,19 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                         RETURN(PTR_ERR(filename));
 
                 ll_inode2id(&id, inode);
-                rc = md_getattr_name(sbi->ll_lmv_exp, &id, filename,
+                rc = md_getattr_lock(sbi->ll_lmv_exp, &id, filename,
                                      strlen(filename) + 1, OBD_MD_FLEASIZE,
                                      obd_size_diskmd(sbi->ll_lov_exp, NULL),
                                      &request);
                 if (rc < 0) {
-                        CDEBUG(D_INFO, "md_getattr_name failed on %s: rc %d\n",
+                        CDEBUG(D_INFO, "md_getattr_lock failed on %s: rc %d\n",
                                filename, rc);
                         GOTO(out_name, rc);
                 }
 
                 body = lustre_msg_buf(request->rq_repmsg, 0, sizeof (*body));
-                LASSERT(body != NULL);         /* checked by md_getattr_name */
-                LASSERT_REPSWABBED(request, 0);/* swabbed by md_getattr_name */
+                LASSERT(body != NULL);         /* checked by md_getattr_lock */
+                LASSERT_REPSWABBED(request, 0);/* swabbed by md_getattr_lock */
 
                 lmmsize = body->eadatasize;
 
index a0fc7df..9bc687f 100644 (file)
@@ -333,7 +333,7 @@ static int ll_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock)
                 RETURN(rc);
         }
         LASSERT(stripe < lsm->lsm_stripe_count);
-
+        EXIT;
 check:
         if (lsm->lsm_oinfo[stripe].loi_id != lock->l_resource->lr_name.name[0]||
             lsm->lsm_oinfo[stripe].loi_gr != lock->l_resource->lr_name.name[2]){
@@ -342,10 +342,10 @@ check:
                            lsm->lsm_oinfo[stripe].loi_id,
                            lsm->lsm_oinfo[stripe].loi_gr,
                            inode->i_ino, inode->i_generation, inode);
-                RETURN(-ELDLM_NO_LOCK_DATA);
+                return -ELDLM_NO_LOCK_DATA;
         }
 
-        RETURN(stripe);
+        return stripe;
 }
 
 /* Flush the page cache for an extent as its canceled.  When we're on an LOV,
@@ -907,13 +907,13 @@ static ssize_t ll_file_write(struct file *file, const char *buf,
 
         /* generic_file_write handles O_APPEND after getting i_sem */
         retval = generic_file_write(file, buf, count, ppos);
-
+        EXIT;
 out:
         ll_tree_unlock(&tree, inode);
         /* serialize with mmap/munmap/mremap */
         lprocfs_counter_add(ll_i2sbi(inode)->ll_stats, LPROC_LL_WRITE_BYTES,
                             retval > 0 ? retval : 0);
-        RETURN(retval);
+        return retval;
 }
 
 static int ll_lov_recreate_obj(struct inode *inode, struct file *file,
@@ -969,7 +969,7 @@ static int ll_lov_recreate_obj(struct inode *inode, struct file *file,
 out:
         up(&lli->lli_open_sem);
         obdo_free(oa);
-        RETURN (rc);
+        return rc;
 }
 
 static int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
@@ -1024,14 +1024,14 @@ static int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
         ll_intent_release(&oit);
 
         rc = ll_file_release(f->f_dentry->d_inode, f);
-
+        EXIT;
  out:
         if (f)
                 put_filp(f);
         up(&lli->lli_open_sem);
         if (req != NULL)
                 ptlrpc_req_finished(req);
-        RETURN(rc);
+        return rc;
 }
 
 static int ll_lov_setea(struct inode *inode, struct file *file,
@@ -1493,10 +1493,11 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it)
          * the file.
          */
         rc = ll_glimpse_size(inode);
+        EXIT;
 out:
         if (req)
                 ptlrpc_req_finished(req);
-        RETURN(rc);
+        return rc;
 }
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
index 7542810..b98c467 100644 (file)
@@ -128,6 +128,7 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
         struct lustre_md md;
         kdev_t devno;
         int err;
+        ENTRY;
 
         obd = class_name2obd(lmv);
         if (!obd) {
@@ -262,7 +263,6 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov)
 #endif
 
         RETURN(err);
-
 out_root:
         if (root)
                 iput(root);
@@ -272,7 +272,7 @@ out_lmv:
         obd_disconnect(sbi->ll_lmv_exp, 0);
 out:
         lprocfs_unregister_mountpoint(sbi);
-        RETURN(err);
+        return err;
 }
 
 void lustre_common_put_super(struct super_block *sb)
@@ -416,6 +416,7 @@ int ll_fill_super(struct super_block *sb, void *data, int silent)
         }
 
         err = lustre_common_fill_super(sb, lmv, lov);
+        EXIT;
 out:
         if (err)
                 lustre_free_sbi(sb);
@@ -424,7 +425,7 @@ out:
                 OBD_FREE(lmv, strlen(lmv) + 1);
         if (lov)
                 OBD_FREE(lov, strlen(lov) + 1);
-        RETURN(err);
+        return err;
 } /* ll_read_super */
 
 static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
@@ -525,7 +526,8 @@ static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
                 CERROR("class_config_process_llog failed: rc = %d\n", rc);
 
         err = obd_disconnect(exp, 0);
-
+        
+        EXIT;
 out_cleanup:
         LCFG_INIT(lcfg, LCFG_CLEANUP, name);
         err = class_process_config(&lcfg);
@@ -559,7 +561,7 @@ out:
         if (rc == 0)
                 rc = err;
 
-        RETURN(rc);
+        return rc;
 }
 
 int lustre_fill_super(struct super_block *sb, void *data, int silent)
@@ -1575,10 +1577,10 @@ int ll_get_fid(struct obd_export *exp, struct lustre_id *idp,
 
         valid |= OBD_MD_FID;
         
-        rc = md_getattr_name(exp, idp, filename, strlen(filename) + 1,
+        rc = md_getattr_lock(exp, idp, filename, strlen(filename) + 1,
                              valid, 0, &request);
         if (rc < 0) {
-                CDEBUG(D_INFO, "md_getattr_name failed on %s: rc %d\n",
+                CDEBUG(D_INFO, "md_getattr_lock failed on %s: rc %d\n",
                        filename, rc);
                 return rc;
         }
index 68af4ac..ff3eefb 100644 (file)
@@ -198,6 +198,7 @@ int ll_tree_unlock(struct ll_lock_tree *tree, struct inode *inode)
 
         RETURN(rc);
 }
+
 int ll_tree_lock(struct ll_lock_tree *tree,
                  struct ll_lock_tree_node *first_node, struct inode *inode,
                  const char *buf, size_t count, int ast_flags)
@@ -236,7 +237,7 @@ int ll_tree_lock(struct ll_lock_tree *tree,
         RETURN(rc);
 out:
         ll_tree_unlock(tree, inode);
-        RETURN(rc);
+        return rc;
 }
 
 static ldlm_mode_t mode_from_vma(struct vm_area_struct *vma)
index a1d1122..f0e5ae1 100644 (file)
@@ -611,9 +611,10 @@ static int ll_mknod(struct inode *dir, struct dentry *child, int mode,
         }
 
         d_instantiate(child, inode);
+        EXIT;
  out_err:
         ptlrpc_req_finished(request);
-        RETURN(err);
+        return err;
 }
 
 static int ll_symlink_raw(struct nameidata *nd, const char *tgt)
@@ -786,6 +787,7 @@ int ll_objects_destroy(struct ptlrpc_request *request,
         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);
  out:
@@ -811,9 +813,10 @@ static int ll_unlink_raw(struct nameidata *nd)
         ll_update_times(request, 0, dir);
         
         rc = ll_objects_destroy(request, dir, 2);
+        EXIT;
 out:
         ptlrpc_req_finished(request);
-        RETURN(rc);
+        return rc;
 }
 
 static int ll_rename_raw(struct nameidata *oldnd, struct nameidata *newnd)
index 9a90d50..cece52b 100644 (file)
@@ -444,13 +444,14 @@ static int queue_or_sync_write(struct obd_export *exp,
         if (!rc && async_flags & ASYNC_READY)
                 unlock_page(llap->llap_page);
 
-        LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, "sync write returned %d\n",
-                       rc);
+        LL_CDEBUG_PAGE(D_PAGE, llap->llap_page,
+                       "sync write returned %d\n", rc);
 
+        EXIT;
 free_oig:
         oig_release(oig);
 out:
-        RETURN(rc);
+        return rc;
 }
 
 void lov_increase_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
@@ -505,7 +506,7 @@ int ll_commit_write(struct file *file, struct page *page, unsigned from,
          * don't dirty the page if it has been write out in q_o_s_w */
         if (llap->llap_write_queued)
                 set_page_dirty(page);
-
+        EXIT;
 out:
         if (rc == 0) {
                 size = (((obd_off)page->index) << PAGE_SHIFT) + to;
@@ -514,7 +515,7 @@ out:
                         inode->i_size = size;
                 SetPageUptodate(page);
         }
-        RETURN(rc);
+        return rc;
 }
                                                                                                                                                                                                      
 int ll_writepage(struct page *page)
@@ -524,18 +525,18 @@ int ll_writepage(struct page *page)
         struct ll_async_page *llap;
         int rc = 0;
         ENTRY;
-                                                                                                                                                                                                     
+
         LASSERT(!PageDirty(page));
         LASSERT(PageLocked(page));
-                                                                                                                                                                                                     
+
         exp = ll_i2obdexp(inode);
         if (exp == NULL)
                 GOTO(out, rc = -EINVAL);
-                                                                                                                                                                                                     
+
         llap = llap_from_page(page);
         if (IS_ERR(llap))
                 GOTO(out, rc = PTR_ERR(llap));
-                                                                                                                                                                                                     
+
         page_cache_get(page);
         if (llap->llap_write_queued) {
                 LL_CDEBUG_PAGE(D_PAGE, page, "marking urgent\n");
@@ -549,13 +550,15 @@ int ll_writepage(struct page *page)
         }
         if (rc)
                 page_cache_release(page);
+        EXIT;
 out:
         if (rc)
                 unlock_page(page);
-        RETURN(rc);
+        return rc;
 }
 
-static unsigned long ll_ra_count_get(struct ll_sb_info *sbi, unsigned long len)
+static unsigned long
+ll_ra_count_get(struct ll_sb_info *sbi, unsigned long len)
 {
         struct ll_ra_info *ra = &sbi->ll_ra_info;
         unsigned long ret;
@@ -971,7 +974,6 @@ out_unlock:
         RAS_CDEBUG(ras);
         spin_unlock(&ras->ras_lock);
         spin_unlock(&sbi->ll_lock);
-        return;
 }
 
 /*
@@ -1052,12 +1054,12 @@ int ll_readpage(struct file *filp, struct page *page)
                              fd->fd_flags);
 
         rc = obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig);
-
+        EXIT;
 out:
         if (rc)
                 unlock_page(page);
 out_oig:
         if (oig != NULL)
                 oig_release(oig);
-        RETURN(rc);
+        return rc;
 }
index 81bb12f..8ebcc4b 100644 (file)
@@ -131,15 +131,17 @@ static int __init init_lustre_lite(void)
 
         printk(KERN_INFO "Lustre: Lustre Lite Client File System; "
                "info@clusterfs.com\n");
+
         rc = ll_init_inodecache();
         if (rc)
                 return -ENOMEM;
+
         ll_file_data_slab = kmem_cache_create("ll_file_data",
                                               sizeof(struct ll_file_data), 0,
                                               SLAB_HWCACHE_ALIGN, NULL, NULL);
         if (ll_file_data_slab == NULL) {
-                GOTO(out, rc = ENOMEM);
-                return -ENOMEM;
+                rc = -ENOMEM;
+                goto out;
         }
 
         proc_lustre_fs_root = proc_lustre_root ?
@@ -147,19 +149,18 @@ static int __init init_lustre_lite(void)
 
         rc = register_filesystem(&lustre_lite_fs_type);
         if (rc)
-                GOTO(out, rc);
+                goto out;
         cleanup = 1;
 
         rc = register_filesystem(&lustre_fs_type);
         if (rc)
-                GOTO(out, rc);
+                goto out;
         cleanup = 2;
 
         rc = ll_gns_start_thread();
         if (rc)
-                GOTO(out, rc);
+                goto out;
         return 0;
-
 out:
         switch (cleanup) {
         case 2:
index 74af9f2..7e84cdb 100644 (file)
@@ -1036,7 +1036,7 @@ int lmv_enqueue(struct obd_export *exp, int lock_type,
         RETURN(rc);
 }
 
-int lmv_getattr_name(struct obd_export *exp, struct lustre_id *id,
+int lmv_getattr_lock(struct obd_export *exp, struct lustre_id *id,
                      char *filename, int namelen, unsigned long valid,
                      unsigned int ea_size, struct ptlrpc_request **request)
 {
@@ -1046,7 +1046,7 @@ int lmv_getattr_name(struct obd_export *exp, struct lustre_id *id,
         struct lustre_id rid = *id;
         struct mds_body *body;
         struct lmv_obj *obj;
-        int fetch_fid_on;
+        int old_valid;
         ENTRY;
         
         rc = lmv_check_connect(obd);
@@ -1063,20 +1063,20 @@ repeat:
                 lmv_put_obj(obj);
         }
         
-        CDEBUG(D_OTHER, "getattr_name for %*s on "DLID4" -> "DLID4"\n",
+        CDEBUG(D_OTHER, "getattr_lock for %*s on "DLID4" -> "DLID4"\n",
                namelen, filename, OLID4(id), OLID4(&rid));
 
-        fetch_fid_on = (valid & OBD_MD_FID);
+       old_valid = valid;
 
         /*
          * here should be applied OBD_MD_FID to ->valid, because otherwise,
-         * mds_getattr_name() will not fetch fid component of lustre_id and
-         * thus, next call to md_getattr_name() will be performed to wrong mds.
+         * 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 (!fetch_fid_on)
+        if (!(old_valid & OBD_MD_FID))
                 valid |= OBD_MD_FID;
         
-        rc = md_getattr_name(lmv->tgts[id_group(&rid)].ltd_exp, 
+        rc = md_getattr_lock(lmv->tgts[id_group(&rid)].ltd_exp, 
                              &rid, filename, namelen, valid,
                              ea_size, request);
         if (rc == 0) {
@@ -1098,10 +1098,10 @@ repeat:
                          * full lustre_id and do need to fetch fid component
                          * again. This will help to make thing slightly faster.
                          */
-                        if (!fetch_fid_on)
+                        if (!(old_valid & OBD_MD_FID))
                                 valid &= ~OBD_MD_FID;
                         
-                        rc = md_getattr_name(lmv->tgts[id_group(&rid)].ltd_exp, 
+                        rc = md_getattr_lock(lmv->tgts[id_group(&rid)].ltd_exp, 
                                              &rid, NULL, 1, valid, ea_size, &req);
                         ptlrpc_req_finished(*request);
                         *request = req;
@@ -1929,7 +1929,7 @@ struct md_ops lmv_md_ops = {
         .m_create               = lmv_create,
         .m_done_writing         = lmv_done_writing,
         .m_enqueue              = lmv_enqueue,
-        .m_getattr_name         = lmv_getattr_name,
+        .m_getattr_lock         = lmv_getattr_lock,
         .m_intent_lock          = lmv_intent_lock,
         .m_link                 = lmv_link,
         .m_rename               = lmv_rename,
index cc46483..bac9cc5 100644 (file)
@@ -240,7 +240,7 @@ int mdc_getattr(struct obd_export *exp, struct lustre_id *id,
         RETURN (rc);
 }
 
-int mdc_getattr_name(struct obd_export *exp, struct lustre_id *id,
+int mdc_getattr_lock(struct obd_export *exp, struct lustre_id *id,
                      char *filename, int namelen, unsigned long valid,
                      unsigned int ea_size, struct ptlrpc_request **request)
 {
@@ -1419,7 +1419,7 @@ struct md_ops mdc_md_ops = {
         .m_create        = mdc_create,
         .m_done_writing  = mdc_done_writing,
         .m_enqueue       = mdc_enqueue,
-        .m_getattr_name  = mdc_getattr_name,
+        .m_getattr_lock  = mdc_getattr_lock,
         .m_intent_lock   = mdc_intent_lock,
         .m_link          = mdc_link,
         .m_rename        = mdc_rename,
@@ -1460,7 +1460,7 @@ EXPORT_SYMBOL(mdc_req2lustre_md);
 EXPORT_SYMBOL(mdc_change_cbdata);
 EXPORT_SYMBOL(mdc_getstatus);
 EXPORT_SYMBOL(mdc_getattr);
-EXPORT_SYMBOL(mdc_getattr_name);
+EXPORT_SYMBOL(mdc_getattr_lock);
 EXPORT_SYMBOL(mdc_create);
 EXPORT_SYMBOL(mdc_unlink);
 EXPORT_SYMBOL(mdc_rename);
index 4ef6145..efd6553 100644 (file)
@@ -937,7 +937,7 @@ static int mds_getattr_lock(struct ptlrpc_request *req, int offset,
         ENTRY;
 
         LASSERT(!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME));
-        MDS_UPDATE_COUNTER((&obd->u.mds), MDS_GETATTR_NAME_COUNT);
+        MDS_UPDATE_COUNTER((&obd->u.mds), MDS_GETATTR_LOCK_COUNT);
 
         rsd = lustre_swab_mds_secdesc(req, MDS_REQ_SECDESC_OFF);
         if (!rsd) {
index 853217c..3069500 100644 (file)
@@ -57,7 +57,7 @@ struct ll_mdscounters_opcode {
        { MDS_LINK_COUNT,          "mds_link" },
        { MDS_UNLINK_COUNT,        "mds_unlink" },
        { MDS_GETATTR_COUNT,       "mds_getattr" },
-       { MDS_GETATTR_NAME_COUNT,  "mds_getattr_name" },
+       { MDS_GETATTR_LOCK_COUNT,  "mds_getattr_lock" },
        { MDS_SETATTR_COUNT,       "mds_setattr" },
        { MDS_RENAME_COUNT,        "mds_rename" },
        { MDS_STATFS_COUNT,        "mds_statfs" },
index a035934..daed20f 100644 (file)
@@ -37,7 +37,7 @@ typedef enum {
         MDS_LINK_COUNT         = 3,
         MDS_UNLINK_COUNT       = 4,
         MDS_GETATTR_COUNT      = 5,
-        MDS_GETATTR_NAME_COUNT = 6,
+        MDS_GETATTR_LOCK_COUNT = 6,
         MDS_SETATTR_COUNT      = 7,
         MDS_RENAME_COUNT       = 8,
         MDS_STATFS_COUNT       = 9,