summaryrefslogtreecommitdiff
path: root/include/linux/ceph/osd_client.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 17:07:23 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 01:36:26 +0300
commit63244fa123a755e4bbaee03022b68613c71d1332 (patch)
tree9e8e983a7ddcd9c03e67abb56a81f90ef24fe75d /include/linux/ceph/osd_client.h
parent04812acf572ef41fd51c11e0bf3385f34c0e1b5b (diff)
downloadlinux-63244fa123a755e4bbaee03022b68613c71d1332.tar.xz
libceph: introduce ceph_osd_request_target, calc_target()
Introduce ceph_osd_request_target, containing all mapping-related fields of ceph_osd_request and calc_target() for calculating mappings and populating it. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph/osd_client.h')
-rw-r--r--include/linux/ceph/osd_client.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 63854a8df183..48806ee4488d 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -24,6 +24,8 @@ typedef void (*ceph_osdc_callback_t)(struct ceph_osd_request *,
struct ceph_msg *);
typedef void (*ceph_osdc_unsafe_callback_t)(struct ceph_osd_request *, bool);
+#define CEPH_HOMELESS_OSD -1
+
/* a given osd we're communicating with */
struct ceph_osd {
atomic_t o_ref;
@@ -118,6 +120,27 @@ struct ceph_osd_req_op {
};
};
+struct ceph_osd_request_target {
+ struct ceph_object_id base_oid;
+ struct ceph_object_locator base_oloc;
+ struct ceph_object_id target_oid;
+ struct ceph_object_locator target_oloc;
+
+ struct ceph_pg pgid;
+ u32 pg_num;
+ u32 pg_num_mask;
+ struct ceph_osds acting;
+ struct ceph_osds up;
+ int size;
+ int min_size;
+ bool sort_bitwise;
+
+ unsigned int flags; /* CEPH_OSD_FLAG_* */
+ bool paused;
+
+ int osd;
+};
+
/* an in-flight request */
struct ceph_osd_request {
u64 r_tid; /* unique for this client */