aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
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 /net/ceph/osd_client.c
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 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index d7ce457c59d9..38d09d13bb15 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -948,8 +948,8 @@ static int __map_request(struct ceph_osd_client *osdc,
948 int err; 948 int err;
949 949
950 dout("map_request %p tid %lld\n", req, req->r_tid); 950 dout("map_request %p tid %lld\n", req, req->r_tid);
951 err = ceph_calc_object_layout(&pgid, req->r_oid, 951 err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap,
952 &req->r_file_layout, osdc->osdmap); 952 ceph_file_layout_pg_pool(req->r_file_layout));
953 if (err) { 953 if (err) {
954 list_move(&req->r_req_lru_item, &osdc->req_notarget); 954 list_move(&req->r_req_lru_item, &osdc->req_notarget);
955 return err; 955 return err;