libceph: support the RADOS copy-from operation
[sfrench/cifs-2.6.git] / include / linux / ceph / osd_client.h
index f3e828460c91cba2ab572587e0e9dcc677e95edf..7a2af5034278f1d4f868a2617e615d1d0eb71d4f 100644 (file)
@@ -136,6 +136,13 @@ struct ceph_osd_req_op {
                        u64 expected_object_size;
                        u64 expected_write_size;
                } alloc_hint;
                        u64 expected_object_size;
                        u64 expected_write_size;
                } alloc_hint;
+               struct {
+                       u64 snapid;
+                       u64 src_version;
+                       u8 flags;
+                       u32 src_fadvise_flags;
+                       struct ceph_osd_data osd_data;
+               } copy_from;
        };
 };
 
        };
 };
 
@@ -510,6 +517,16 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc,
                                struct timespec64 *mtime,
                                struct page **pages, int nr_pages);
 
                                struct timespec64 *mtime,
                                struct page **pages, int nr_pages);
 
+int ceph_osdc_copy_from(struct ceph_osd_client *osdc,
+                       u64 src_snapid, u64 src_version,
+                       struct ceph_object_id *src_oid,
+                       struct ceph_object_locator *src_oloc,
+                       u32 src_fadvise_flags,
+                       struct ceph_object_id *dst_oid,
+                       struct ceph_object_locator *dst_oloc,
+                       u32 dst_fadvise_flags,
+                       u8 copy_from_flags);
+
 /* watch/notify */
 struct ceph_osd_linger_request *
 ceph_osdc_watch(struct ceph_osd_client *osdc,
 /* watch/notify */
 struct ceph_osd_linger_request *
 ceph_osdc_watch(struct ceph_osd_client *osdc,