From 88069d86678bd6561b428c2085e08c7923ce8838 Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 14 Sep 2006 10:45:32 +0000 Subject: [PATCH] - make all "getters" name correspond to naming paradigm module-object-action. --- lustre/cmm/cmm_device.c | 12 ++++++------ lustre/cmm/cmm_internal.h | 2 +- lustre/cmm/cmm_split.c | 2 +- lustre/include/dt_object.h | 4 ++-- lustre/include/md_object.h | 4 ++-- lustre/mdd/mdd_handler.c | 10 +++++----- lustre/mdt/mdt_handler.c | 4 ++-- lustre/obdclass/dt_object.c | 2 +- lustre/osd/osd_handler.c | 12 ++++++------ 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lustre/cmm/cmm_device.c b/lustre/cmm/cmm_device.c index 19085e4..2f9f6f0 100644 --- a/lustre/cmm/cmm_device.c +++ b/lustre/cmm/cmm_device.c @@ -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; diff --git a/lustre/cmm/cmm_internal.h b/lustre/cmm/cmm_internal.h index f4f9b8a..3274ed2 100644 --- a/lustre/cmm/cmm_internal.h +++ b/lustre/cmm/cmm_internal.h @@ -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 diff --git a/lustre/cmm/cmm_split.c b/lustre/cmm/cmm_split.c index 058eb1c..ce0bffc 100644 --- a/lustre/cmm/cmm_split.c +++ b/lustre/cmm/cmm_split.c @@ -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); diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 2bbe464..09ab1c2 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -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); /* diff --git a/lustre/include/md_object.h b/lustre/include/md_object.h index 4b13e72..2ec5626 100644 --- a/lustre/include/md_object.h +++ b/lustre/include/md_object.h @@ -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, diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 3c4ac7b..25b9392 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -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 = { diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 335df316..e240ad8 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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", diff --git a/lustre/obdclass/dt_object.c b/lustre/obdclass/dt_object.c index 98c7c14..a574ab2 100644 --- a/lustre/obdclass/dt_object.c +++ b/lustre/obdclass/dt_object.c @@ -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)) { diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 6e98fc9..85aef47 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -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 }; -- 1.8.3.1