]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/ceph/osd_client.h
ceph: kill ceph_osdc_writepages() "dosync" parameter
[mirror_ubuntu-artful-kernel.git] / include / linux / ceph / osd_client.h
index d9b880e977e62fa5dcf853baf8dbffedf8c38cda..7a63100a3e69d2d84d79fc8405e470cc6369cb69 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/ceph/osdmap.h>
 #include <linux/ceph/messenger.h>
 #include <linux/ceph/auth.h>
+#include <linux/ceph/pagelist.h>
 
 /* 
  * Maximum object name size 
@@ -22,7 +23,6 @@ struct ceph_snap_context;
 struct ceph_osd_request;
 struct ceph_osd_client;
 struct ceph_authorizer;
-struct ceph_pagelist;
 
 /*
  * completion callback for async writepages
@@ -95,7 +95,7 @@ struct ceph_osd_request {
        struct bio       *r_bio;              /* instead of pages */
 #endif
 
-       struct ceph_pagelist *r_trail;        /* trailing part of the data */
+       struct ceph_pagelist r_trail;         /* trailing part of the data */
 };
 
 struct ceph_osd_event {
@@ -157,7 +157,7 @@ struct ceph_osd_client {
 
 struct ceph_osd_req_op {
        u16 op;           /* CEPH_OSD_OP_* */
-       u32 flags;        /* CEPH_OSD_FLAG_* */
+       u32 payload_len;
        union {
                struct {
                        u64 offset, length;
@@ -166,23 +166,24 @@ struct ceph_osd_req_op {
                } extent;
                struct {
                        const char *name;
-                       u32 name_len;
                        const char  *val;
+                       u32 name_len;
                        u32 value_len;
                        __u8 cmp_op;       /* CEPH_OSD_CMPXATTR_OP_* */
                        __u8 cmp_mode;     /* CEPH_OSD_CMPXATTR_MODE_* */
                } xattr;
                struct {
                        const char *class_name;
-                       __u8 class_len;
                        const char *method_name;
-                       __u8 method_len;
-                       __u8 argc;
                        const char *indata;
                        u32 indata_len;
+                       __u8 class_len;
+                       __u8 method_len;
+                       __u8 argc;
                } cls;
                struct {
-                       u64 cookie, count;
+                       u64 cookie;
+                       u64 count;
                } pgls;
                struct {
                        u64 snapid;
@@ -190,12 +191,11 @@ struct ceph_osd_req_op {
                struct {
                        u64 cookie;
                        u64 ver;
-                       __u8 flag;
                        u32 prot_ver;
                        u32 timeout;
+                       __u8 flag;
                } watch;
        };
-       u32 payload_len;
 };
 
 extern int ceph_osdc_init(struct ceph_osd_client *osdc,
@@ -207,29 +207,24 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
 extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
                                 struct ceph_msg *msg);
 
-extern int ceph_calc_raw_layout(struct ceph_osd_client *osdc,
-                       struct ceph_file_layout *layout,
-                       u64 snapid,
+extern int ceph_calc_raw_layout(struct ceph_file_layout *layout,
                        u64 off, u64 *plen, u64 *bno,
                        struct ceph_osd_request *req,
                        struct ceph_osd_req_op *op);
 
 extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
-                                              int flags,
                                               struct ceph_snap_context *snapc,
-                                              struct ceph_osd_req_op *ops,
+                                              unsigned int num_op,
                                               bool use_mempool,
-                                              gfp_t gfp_flags,
-                                              struct page **pages,
-                                              struct bio *bio);
+                                              gfp_t gfp_flags);
 
 extern void ceph_osdc_build_request(struct ceph_osd_request *req,
-                                   u64 off, u64 *plen,
+                                   u64 off, u64 len,
+                                   unsigned int num_op,
                                    struct ceph_osd_req_op *src_ops,
                                    struct ceph_snap_context *snapc,
-                                   struct timespec *mtime,
-                                   const char *oid,
-                                   int oid_len);
+                                   u64 snap_id,
+                                   struct timespec *mtime);
 
 extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
                                      struct ceph_file_layout *layout,
@@ -280,7 +275,7 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc,
                                u32 truncate_seq, u64 truncate_size,
                                struct timespec *mtime,
                                struct page **pages, int nr_pages,
-                               int flags, int do_sync, bool nofail);
+                               int flags);
 
 /* watch/notify events */
 extern int ceph_osdc_create_event(struct ceph_osd_client *osdc,