libceph: all features fields must be u64
authorIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 24 Dec 2013 19:19:23 +0000 (21:19 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 31 Dec 2013 18:32:08 +0000 (20:32 +0200)
In preparation for ceph_features.h update, change all features fields
from unsigned int/u32 to u64.  (ceph.git has ~40 feature bits at this
point.)

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
fs/ceph/mds_client.c
fs/ceph/super.c
include/linux/ceph/libceph.h
include/linux/ceph/messenger.h
net/ceph/ceph_common.c
net/ceph/messenger.c

index d90861f452107cc47b7242e8ea66dc1257f7c235..4a13f6e7206978cbc4edc745241d81fd0752bba7 100644 (file)
@@ -63,7 +63,7 @@ static const struct ceph_connection_operations mds_con_ops;
  */
 static int parse_reply_info_in(void **p, void *end,
                               struct ceph_mds_reply_info_in *info,
-                              int features)
+                              u64 features)
 {
        int err = -EIO;
 
@@ -98,7 +98,7 @@ bad:
  */
 static int parse_reply_info_trace(void **p, void *end,
                                  struct ceph_mds_reply_info_parsed *info,
-                                 int features)
+                                 u64 features)
 {
        int err;
 
@@ -145,7 +145,7 @@ out_bad:
  */
 static int parse_reply_info_dir(void **p, void *end,
                                struct ceph_mds_reply_info_parsed *info,
-                               int features)
+                               u64 features)
 {
        u32 num, i = 0;
        int err;
@@ -217,7 +217,7 @@ out_bad:
  */
 static int parse_reply_info_filelock(void **p, void *end,
                                     struct ceph_mds_reply_info_parsed *info,
-                                    int features)
+                                    u64 features)
 {
        if (*p + sizeof(*info->filelock_reply) > end)
                goto bad;
@@ -238,7 +238,7 @@ bad:
  */
 static int parse_reply_info_create(void **p, void *end,
                                  struct ceph_mds_reply_info_parsed *info,
-                                 int features)
+                                 u64 features)
 {
        if (features & CEPH_FEATURE_REPLY_CREATE_INODE) {
                if (*p == end) {
@@ -262,7 +262,7 @@ bad:
  */
 static int parse_reply_info_extra(void **p, void *end,
                                  struct ceph_mds_reply_info_parsed *info,
-                                 int features)
+                                 u64 features)
 {
        if (info->head->op == CEPH_MDS_OP_GETFILELOCK)
                return parse_reply_info_filelock(p, end, info, features);
@@ -280,7 +280,7 @@ static int parse_reply_info_extra(void **p, void *end,
  */
 static int parse_reply_info(struct ceph_msg *msg,
                            struct ceph_mds_reply_info_parsed *info,
-                           int features)
+                           u64 features)
 {
        void *p, *end;
        u32 len;
index c6740e43a3518fa1aca7251fad67c200ec400dfb..2df963f1cf5a3b84615772e793cd45eeddec801f 100644 (file)
@@ -490,10 +490,10 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
                                        struct ceph_options *opt)
 {
        struct ceph_fs_client *fsc;
-       const unsigned supported_features =
+       const u64 supported_features =
                CEPH_FEATURE_FLOCK |
                CEPH_FEATURE_DIRLAYOUTHASH;
-       const unsigned required_features = 0;
+       const u64 required_features = 0;
        int page_count;
        size_t size;
        int err = -ENOMEM;
index 2e3024881a5e3e3939264c032b000f1c9d80d367..7d704db60cbb0c59e67a0b027e53310db5504ec8 100644 (file)
@@ -122,8 +122,8 @@ struct ceph_client {
 
        int (*extra_mon_dispatch)(struct ceph_client *, struct ceph_msg *);
 
-       u32 supported_features;
-       u32 required_features;
+       u64 supported_features;
+       u64 required_features;
 
        struct ceph_messenger msgr;   /* messenger instance */
        struct ceph_mon_client monc;
@@ -192,8 +192,8 @@ extern int ceph_compare_options(struct ceph_options *new_opt,
                                struct ceph_client *client);
 extern struct ceph_client *ceph_create_client(struct ceph_options *opt,
                                              void *private,
-                                             unsigned supported_features,
-                                             unsigned required_features);
+                                             u64 supported_features,
+                                             u64 required_features);
 extern u64 ceph_client_id(struct ceph_client *client);
 extern void ceph_destroy_client(struct ceph_client *client);
 extern int __ceph_open_session(struct ceph_client *client,
index 7c1420bb1dcef40e6f8e4cc571ef5ea2c25df913..c1d3f5a65273bacc6ffe45a130983b002a35c308 100644 (file)
@@ -60,8 +60,8 @@ struct ceph_messenger {
        u32 global_seq;
        spinlock_t global_seq_lock;
 
-       u32 supported_features;
-       u32 required_features;
+       u64 supported_features;
+       u64 required_features;
 };
 
 enum ceph_msg_data_type {
@@ -192,7 +192,7 @@ struct ceph_connection {
 
        struct ceph_entity_name peer_name; /* peer name */
 
-       unsigned peer_features;
+       u64 peer_features;
        u32 connect_seq;      /* identify the most recent connection
                                 attempt for this connection, client */
        u32 peer_global_seq;  /* peer's global seq for this connection */
@@ -256,8 +256,8 @@ extern void ceph_msgr_flush(void);
 
 extern void ceph_messenger_init(struct ceph_messenger *msgr,
                        struct ceph_entity_addr *myaddr,
-                       u32 supported_features,
-                       u32 required_features,
+                       u64 supported_features,
+                       u64 required_features,
                        bool nocrc);
 
 extern void ceph_con_init(struct ceph_connection *con, void *private,
index 34b11ee8124ee9b04a7026063b9159e6ce864be2..43d8177a52e1e82b5b4d391cf4157c7fb7759df3 100644 (file)
@@ -461,8 +461,8 @@ EXPORT_SYMBOL(ceph_client_id);
  * create a fresh client instance
  */
 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
-                                      unsigned int supported_features,
-                                      unsigned int required_features)
+                                      u64 supported_features,
+                                      u64 required_features)
 {
        struct ceph_client *client;
        struct ceph_entity_addr *myaddr = NULL;
index 4a5df7b1cc9ff5652185e0248cf5a4df4006effd..260670558746c726dfb2692e0e96f21001dcf239 100644 (file)
@@ -2853,8 +2853,8 @@ static void con_fault(struct ceph_connection *con)
  */
 void ceph_messenger_init(struct ceph_messenger *msgr,
                        struct ceph_entity_addr *myaddr,
-                       u32 supported_features,
-                       u32 required_features,
+                       u64 supported_features,
+                       u64 required_features,
                        bool nocrc)
 {
        msgr->supported_features = supported_features;