aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-01 19:00:15 -0500
committerSage Weil <sage@inktank.com>2013-05-02 00:16:17 -0400
commit41766f87f54cc8bef023b4b0550f48753959345a (patch)
tree58d11a1e3fcb0aef8d97b6cdc48bcf5811d32001 /include/linux/ceph
parentec02a2f2ffae13e038453ae89592a8c6210f7f4d (diff)
libceph: rename ceph_calc_object_layout()
The purpose of ceph_calc_object_layout() is to fill in the pool number and seed for a ceph_pg structure provided, based on a given osd map and target object id. Currently that function takes a file layout parameter, but the only thing used out of that is its pool number. Change the function so it takes a pool number rather than the full file layout structure. Only update the ceph_pg if the pool is found in the osd map. Get rid of few useless lines of code from the function while there. Since the function now very clearly just fills in the ceph_pg structure it's provided, rename it ceph_calc_ceph_pg(). Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osdmap.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index c819190d1642..167daf60c4e8 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -131,10 +131,8 @@ extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
131 u64 *bno, u64 *oxoff, u64 *oxlen); 131 u64 *bno, u64 *oxoff, u64 *oxlen);
132 132
133/* calculate mapping of object to a placement group */ 133/* calculate mapping of object to a placement group */
134extern int ceph_calc_object_layout(struct ceph_pg *pg, 134extern int ceph_calc_ceph_pg(struct ceph_pg *pg, const char *oid,
135 const char *oid, 135 struct ceph_osdmap *osdmap, uint64_t pool);
136 struct ceph_file_layout *fl,
137 struct ceph_osdmap *osdmap);
138extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, 136extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap,
139 struct ceph_pg pgid, 137 struct ceph_pg pgid,
140 int *acting); 138 int *acting);