aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/ioctl.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/ioctl.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/ioctl.c')
-rw-r--r--fs/ceph/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index e4f99eff5d9..4c33e19fc24 100644
--- a/fs/ceph/ioctl.c
+++ b/fs/ceph/ioctl.c
@@ -99,7 +99,7 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg)
99 u64 len = 1, olen; 99 u64 len = 1, olen;
100 u64 tmp; 100 u64 tmp;
101 struct ceph_object_layout ol; 101 struct ceph_object_layout ol;
102 union ceph_pg pgid; 102 struct ceph_pg pgid;
103 103
104 /* copy and validate */ 104 /* copy and validate */
105 if (copy_from_user(&dl, arg, sizeof(dl))) 105 if (copy_from_user(&dl, arg, sizeof(dl)))
@@ -121,7 +121,7 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg)
121 ceph_calc_object_layout(&ol, dl.object_name, &ci->i_layout, 121 ceph_calc_object_layout(&ol, dl.object_name, &ci->i_layout,
122 osdc->osdmap); 122 osdc->osdmap);
123 123
124 pgid.pg64 = le64_to_cpu(ol.ol_pgid); 124 pgid = ol.ol_pgid;
125 dl.osd = ceph_calc_pg_primary(osdc->osdmap, pgid); 125 dl.osd = ceph_calc_pg_primary(osdc->osdmap, pgid);
126 if (dl.osd >= 0) { 126 if (dl.osd >= 0) {
127 struct ceph_entity_addr *a = 127 struct ceph_entity_addr *a =