aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-04 14:39:12 -0500
committerSage Weil <sage@newdream.net>2009-11-04 19:36:07 -0500
commit51042122d4f85e0f8ee577a4230f172fcc57c456 (patch)
treed5ccf5f84d362b6542a86eab6b6f50112111434b /fs/ceph/osd_client.c
parent63f2d211954b790fea0a9caeae605c7956535af6 (diff)
ceph: fix endian conversions for ceph_pg
The endian conversions don't quite work with the old union ceph_pg. Just make it a regular struct, and make each field __le. This is simpler and it has the added bonus of actually working. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osd_client.c')
-rw-r--r--fs/ceph/osd_client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index 7dc0f6299a52..7db14ba6261c 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -520,7 +520,7 @@ static int __map_osds(struct ceph_osd_client *osdc,
520 struct ceph_osd_request *req) 520 struct ceph_osd_request *req)
521{ 521{
522 struct ceph_osd_request_head *reqhead = req->r_request->front.iov_base; 522 struct ceph_osd_request_head *reqhead = req->r_request->front.iov_base;
523 union ceph_pg pgid; 523 struct ceph_pg pgid;
524 int o = -1; 524 int o = -1;
525 int err; 525 int err;
526 struct ceph_osd *newosd = NULL; 526 struct ceph_osd *newosd = NULL;
@@ -530,7 +530,7 @@ static int __map_osds(struct ceph_osd_client *osdc,
530 &req->r_file_layout, osdc->osdmap); 530 &req->r_file_layout, osdc->osdmap);
531 if (err) 531 if (err)
532 return err; 532 return err;
533 pgid.pg64 = le64_to_cpu(reqhead->layout.ol_pgid); 533 pgid = reqhead->layout.ol_pgid;
534 o = ceph_calc_pg_primary(osdc->osdmap, pgid); 534 o = ceph_calc_pg_primary(osdc->osdmap, pgid);
535 535
536 if ((req->r_osd && req->r_osd->o_osd == o && 536 if ((req->r_osd && req->r_osd->o_osd == o &&
@@ -538,8 +538,8 @@ static int __map_osds(struct ceph_osd_client *osdc,
538 (req->r_osd == NULL && o == -1)) 538 (req->r_osd == NULL && o == -1))
539 return 0; /* no change */ 539 return 0; /* no change */
540 540
541 dout("map_osds tid %llu pgid %llx pool %d osd%d (was osd%d)\n", 541 dout("map_osds tid %llu pgid %d.%x osd%d (was osd%d)\n",
542 req->r_tid, pgid.pg64, pgid.pg.pool, o, 542 req->r_tid, le32_to_cpu(pgid.pool), le16_to_cpu(pgid.ps), o,
543 req->r_osd ? req->r_osd->o_osd : -1); 543 req->r_osd ? req->r_osd->o_osd : -1);
544 544
545 if (req->r_osd) { 545 if (req->r_osd) {