diff options
author | Alex Elder <elder@inktank.com> | 2013-03-02 00:00:15 (GMT) |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 04:16:17 (GMT) |
commit | 41766f87f54cc8bef023b4b0550f48753959345a (patch) | |
tree | 58d11a1e3fcb0aef8d97b6cdc48bcf5811d32001 /net/ceph/osd_client.c | |
parent | ec02a2f2ffae13e038453ae89592a8c6210f7f4d (diff) | |
download | linux-41766f87f54cc8bef023b4b0550f48753959345a.tar.xz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index d7ce457..38d09d1 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, int err; dout("map_request %p tid %lld\n", req, req->r_tid); - err = ceph_calc_object_layout(&pgid, req->r_oid, - &req->r_file_layout, osdc->osdmap); + err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap, + ceph_file_layout_pg_pool(req->r_file_layout)); if (err) { list_move(&req->r_req_lru_item, &osdc->req_notarget); return err; |