summaryrefslogtreecommitdiff
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-26 04:13:08 +0400
committerSage Weil <sage@inktank.com>2013-02-27 03:02:37 +0400
commit2169aea649c08374bec7d220a3b8f64712275356 (patch)
tree8a287c8239a5e1fc47afae4fbec530a467825706 /include/linux/ceph
parent4f6a7e5ee1393ec4b243b39dac9f36992d161540 (diff)
downloadlinux-2169aea649c08374bec7d220a3b8f64712275356.tar.xz
libceph: calculate placement based on the internal data types
Instead of using the old ceph_object_layout struct, update our internal ceph_calc_object_layout method to use the ceph_pg type. This allows us to pass the full 32-bit precision of the pgid.seed to the callers. It also allows some callers to avoid reaching into the request structures for the struct ceph_object_layout fields. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h1
-rw-r--r--include/linux/ceph/osdmap.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 388158ff0cbc..ad8899fc3157 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -82,6 +82,7 @@ struct ceph_osd_request {
char r_oid[MAX_OBJ_NAME_SIZE]; /* object name */
int r_oid_len;
+ u64 r_snapid;
unsigned long r_stamp; /* send OR check time */
struct ceph_file_layout r_file_layout;
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 8587746b7f0e..35985125f118 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -129,7 +129,7 @@ extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
u64 *bno, u64 *oxoff, u64 *oxlen);
/* calculate mapping of object to a placement group */
-extern int ceph_calc_object_layout(struct ceph_object_layout *ol,
+extern int ceph_calc_object_layout(struct ceph_pg *pg,
const char *oid,
struct ceph_file_layout *fl,
struct ceph_osdmap *osdmap);