libceph: introduce ceph_osd_request_target, calc_target()
[linux-2.6-microblaze.git] / include / linux / ceph / osd_client.h
index 63854a8..48806ee 100644 (file)
@@ -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 */