Whamcloud - gitweb
- make all "getters" name correspond to naming paradigm module-object-action.
authoryury <yury>
Thu, 14 Sep 2006 10:45:32 +0000 (10:45 +0000)
committeryury <yury>
Thu, 14 Sep 2006 10:45:32 +0000 (10:45 +0000)
lustre/cmm/cmm_device.c
lustre/cmm/cmm_internal.h
lustre/cmm/cmm_split.c
lustre/include/dt_object.h
lustre/include/md_object.h
lustre/mdd/mdd_handler.c
lustre/mdt/mdt_handler.c
lustre/obdclass/dt_object.c
lustre/osd/osd_handler.c

index 19085e4..2f9f6f0 100644 (file)
@@ -51,13 +51,13 @@ static inline int lu_device_is_cmm(struct lu_device *d)
        return ergo(d != NULL && d->ld_ops != NULL, d->ld_ops == &cmm_lu_ops);
 }
 
-int cmm_get_root(const struct lu_context *ctx, struct md_device *md,
+int cmm_root_get(const struct lu_context *ctx, struct md_device *md,
                  struct lu_fid *fid)
 {
         struct cmm_device *cmm_dev = md2cmm_dev(md);
         /* valid only on master MDS */
         if (cmm_dev->cmm_local_num == 0)
-                return cmm_child_ops(cmm_dev)->mdo_get_root(ctx,
+                return cmm_child_ops(cmm_dev)->mdo_root_get(ctx,
                                      cmm_dev->cmm_child, fid);
         else
                 return -EINVAL;
@@ -74,21 +74,21 @@ static int cmm_statfs(const struct lu_context *ctxt, struct md_device *md,
         RETURN (rc);
 }
 
-static int cmm_get_maxsize(const struct lu_context *ctxt, struct md_device *md,
+static int cmm_maxsize_get(const struct lu_context *ctxt, struct md_device *md,
                            int *md_size, int *cookie_size)
 {
         struct cmm_device *cmm_dev = md2cmm_dev(md);
         int rc;
         ENTRY;
-        rc = cmm_child_ops(cmm_dev)->mdo_get_maxsize(ctxt,
+        rc = cmm_child_ops(cmm_dev)->mdo_maxsize_get(ctxt,
                                      cmm_dev->cmm_child, md_size, cookie_size);
         RETURN(rc);
 }
 
 static struct md_device_operations cmm_md_ops = {
         .mdo_statfs         = cmm_statfs,
-        .mdo_get_root       = cmm_get_root,
-        .mdo_get_maxsize    = cmm_get_maxsize,
+        .mdo_root_get       = cmm_root_get,
+        .mdo_maxsize_get    = cmm_maxsize_get,
 };
 
 extern struct lu_device_type mdc_device_type;
index f4f9b8a..3274ed2 100644 (file)
@@ -118,7 +118,7 @@ struct lu_object *cmm_object_alloc(const struct lu_context *ctx,
                                    const struct lu_object_header *hdr,
                                    struct lu_device *);
 
-int cmm_get_root(const struct lu_context *ctx, struct md_device *md,
+int cmm_root_get(const struct lu_context *ctx, struct md_device *md,
                  struct lu_fid *fid);
 
 #ifdef HAVE_SPLIT_SUPPORT
index 058eb1c..ce0bffc 100644 (file)
@@ -71,7 +71,7 @@ static int cmm_expect_splitting(const struct lu_context *ctx,
                 GOTO(cleanup, rc = CMM_NO_SPLIT_EXPECTED);
 
         OBD_ALLOC_PTR(fid);
-        rc = cmm_get_root(ctx, &cmm->cmm_md_dev, fid);
+        rc = cmm_root_get(ctx, &cmm->cmm_md_dev, fid);
         if (rc)
                 GOTO(cleanup, rc);
 
index 2bbe464..09ab1c2 100644 (file)
@@ -82,12 +82,12 @@ struct dt_device_operations {
         /*
          * Return fid of root index object.
          */
-        int   (*dt_get_root)(const struct lu_context *ctx,
+        int   (*dt_root_get)(const struct lu_context *ctx,
                              struct dt_device *dev, struct lu_fid *f);
         /*
          * Return device configuration data.
          */
-        void  (*dt_get_conf)(const struct lu_context *ctx,
+        void  (*dt_conf_get)(const struct lu_context *ctx,
                              const struct dt_device *dev,
                              struct dt_device_param *param);
         /*
index 4b13e72..2ec5626 100644 (file)
@@ -171,9 +171,9 @@ struct md_dir_operations {
 
 struct md_device_operations {
         /* meta-data device related handlers. */
-        int (*mdo_get_root)(const struct lu_context *ctx,
+        int (*mdo_root_get)(const struct lu_context *ctx,
                             struct md_device *m, struct lu_fid *f);
-        int (*mdo_get_maxsize)(const struct lu_context *ctx,
+        int (*mdo_maxsize_get)(const struct lu_context *ctx,
                                struct md_device *m, int *md_size,
                                int *cookie_size);
         int (*mdo_statfs)(const struct lu_context *ctx,
index 3c4ac7b..25b9392 100644 (file)
@@ -554,7 +554,7 @@ static int mdd_process_config(const struct lu_context *ctxt,
                 rc = next->ld_ops->ldo_process_config(ctxt, next, cfg);
                 if (rc)
                         GOTO(out, rc);
-                dt->dd_ops->dt_get_conf(ctxt, dt, &m->mdd_dt_conf);
+                dt->dd_ops->dt_conf_get(ctxt, dt, &m->mdd_dt_conf);
 
                 rc = mdd_mount(ctxt, m);
                 if (rc)
@@ -1999,7 +1999,7 @@ cleanup:
         RETURN(rc);
 }
 
-static int mdd_get_root(const struct lu_context *ctx,
+static int mdd_root_get(const struct lu_context *ctx,
                         struct md_device *m, struct lu_fid *f)
 {
         struct mdd_device *mdd = lu2mdd_dev(&m->md_lu_dev);
@@ -2022,7 +2022,7 @@ static int mdd_statfs(const struct lu_context *ctx,
         RETURN(rc);
 }
 
-static int mdd_get_maxsize(const struct lu_context *ctx,
+static int mdd_maxsize_get(const struct lu_context *ctx,
                            struct md_device *m, int *md_size,
                            int *cookie_size)
 {
@@ -2171,8 +2171,8 @@ static int mdd_readpage(const struct lu_context *ctxt, struct md_object *obj,
 
 struct md_device_operations mdd_ops = {
         .mdo_statfs         = mdd_statfs,
-        .mdo_get_root       = mdd_get_root,
-        .mdo_get_maxsize    = mdd_get_maxsize,
+        .mdo_root_get       = mdd_root_get,
+        .mdo_maxsize_get    = mdd_maxsize_get,
 };
 
 static struct md_dir_operations mdd_dir_ops = {
index 335df31..e240ad8 100644 (file)
@@ -157,7 +157,7 @@ static int mdt_getstatus(struct mdt_thread_info *info)
                 rc = -ENOMEM;
         else {
                 body = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY);
-                rc = next->md_ops->mdo_get_root(info->mti_ctxt,
+                rc = next->md_ops->mdo_root_get(info->mti_ctxt,
                                                 next, &body->fid1);
                 if (rc == 0)
                         body->valid |= OBD_MD_FLID;
@@ -3121,7 +3121,7 @@ static int mdt_upcall(const struct lu_context *ctx, struct md_device *md,
 
         switch (ev) {
                 case MD_LOV_SYNC:
-                        rc = next->md_ops->mdo_get_maxsize(ctx, next,
+                        rc = next->md_ops->mdo_maxsize_get(ctx, next,
                                         &m->mdt_max_mdsize,
                                         &m->mdt_max_cookiesize);
                         CDEBUG(D_INFO, "get max mdsize %d max cookiesize %d\n",
index 98c7c14..a574ab2 100644 (file)
@@ -181,7 +181,7 @@ struct dt_object *dt_store_open(const struct lu_context *ctx,
         struct dt_object *root;
         struct dt_object *child;
 
-        result = dt->dd_ops->dt_get_root(ctx, dt, fid);
+        result = dt->dd_ops->dt_root_get(ctx, dt, fid);
         if (result == 0) {
                 root = dt_locate(ctx, dt, fid);
                 if (!IS_ERR(root)) {
index 6e98fc9..85aef47 100644 (file)
@@ -112,7 +112,7 @@ struct osd_device {
         struct lu_context         od_ctx_for_commit;
 };
 
-static int   osd_get_root      (const struct lu_context *ctxt,
+static int   osd_root_get      (const struct lu_context *ctxt,
                                 struct dt_device *dev, struct lu_fid *f);
 static int   osd_statfs        (const struct lu_context *ctxt,
                                 struct dt_device *dev, struct kstatfs *sfs);
@@ -177,7 +177,7 @@ static int   osd_it_del        (const struct lu_context *ctx, struct dt_it *di,
                                 struct thandle *th);
 static int   osd_it_key_size   (const struct lu_context *ctx,
                                 const struct dt_it *di);
-static void  osd_get_conf      (const struct lu_context *ctx,
+static void  osd_conf_get      (const struct lu_context *ctx,
                                 const struct dt_device *dev,
                                 struct dt_device_param *param);
 static int   osd_read_locked   (const struct lu_context *ctx,
@@ -293,7 +293,7 @@ static void osd_rw_fini(mm_segment_t *seg)
         set_fs(*seg);
 }
 
-static int osd_get_root(const struct lu_context *ctx,
+static int osd_root_get(const struct lu_context *ctx,
                         struct dt_device *dev, struct lu_fid *f)
 {
         struct inode *inode;
@@ -433,7 +433,7 @@ static int osd_statfs(const struct lu_context *ctx,
         RETURN (result);
 }
 
-static void osd_get_conf(const struct lu_context *ctx,
+static void osd_conf_get(const struct lu_context *ctx,
                          const struct dt_device *dev,
                          struct dt_device_param *param)
 {
@@ -584,11 +584,11 @@ static void osd_ro(const struct lu_context *ctx, struct dt_device *d)
 
 
 static struct dt_device_operations osd_dt_ops = {
-        .dt_get_root    = osd_get_root,
+        .dt_root_get    = osd_root_get,
         .dt_statfs      = osd_statfs,
         .dt_trans_start = osd_trans_start,
         .dt_trans_stop  = osd_trans_stop,
-        .dt_get_conf    = osd_get_conf,
+        .dt_conf_get    = osd_conf_get,
         .dt_sync        = osd_sync,
         .dt_ro          = osd_ro
 };