Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: all features fields must be u64

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>

+22 -22
+7 -7
fs/ceph/mds_client.c
··· 63 63 */ 64 64 static int parse_reply_info_in(void **p, void *end, 65 65 struct ceph_mds_reply_info_in *info, 66 - int features) 66 + u64 features) 67 67 { 68 68 int err = -EIO; 69 69 ··· 98 98 */ 99 99 static int parse_reply_info_trace(void **p, void *end, 100 100 struct ceph_mds_reply_info_parsed *info, 101 - int features) 101 + u64 features) 102 102 { 103 103 int err; 104 104 ··· 145 145 */ 146 146 static int parse_reply_info_dir(void **p, void *end, 147 147 struct ceph_mds_reply_info_parsed *info, 148 - int features) 148 + u64 features) 149 149 { 150 150 u32 num, i = 0; 151 151 int err; ··· 217 217 */ 218 218 static int parse_reply_info_filelock(void **p, void *end, 219 219 struct ceph_mds_reply_info_parsed *info, 220 - int features) 220 + u64 features) 221 221 { 222 222 if (*p + sizeof(*info->filelock_reply) > end) 223 223 goto bad; ··· 238 238 */ 239 239 static int parse_reply_info_create(void **p, void *end, 240 240 struct ceph_mds_reply_info_parsed *info, 241 - int features) 241 + u64 features) 242 242 { 243 243 if (features & CEPH_FEATURE_REPLY_CREATE_INODE) { 244 244 if (*p == end) { ··· 262 262 */ 263 263 static int parse_reply_info_extra(void **p, void *end, 264 264 struct ceph_mds_reply_info_parsed *info, 265 - int features) 265 + u64 features) 266 266 { 267 267 if (info->head->op == CEPH_MDS_OP_GETFILELOCK) 268 268 return parse_reply_info_filelock(p, end, info, features); ··· 280 280 */ 281 281 static int parse_reply_info(struct ceph_msg *msg, 282 282 struct ceph_mds_reply_info_parsed *info, 283 - int features) 283 + u64 features) 284 284 { 285 285 void *p, *end; 286 286 u32 len;
+2 -2
fs/ceph/super.c
··· 490 490 struct ceph_options *opt) 491 491 { 492 492 struct ceph_fs_client *fsc; 493 - const unsigned supported_features = 493 + const u64 supported_features = 494 494 CEPH_FEATURE_FLOCK | 495 495 CEPH_FEATURE_DIRLAYOUTHASH; 496 - const unsigned required_features = 0; 496 + const u64 required_features = 0; 497 497 int page_count; 498 498 size_t size; 499 499 int err = -ENOMEM;
+4 -4
include/linux/ceph/libceph.h
··· 122 122 123 123 int (*extra_mon_dispatch)(struct ceph_client *, struct ceph_msg *); 124 124 125 - u32 supported_features; 126 - u32 required_features; 125 + u64 supported_features; 126 + u64 required_features; 127 127 128 128 struct ceph_messenger msgr; /* messenger instance */ 129 129 struct ceph_mon_client monc; ··· 192 192 struct ceph_client *client); 193 193 extern struct ceph_client *ceph_create_client(struct ceph_options *opt, 194 194 void *private, 195 - unsigned supported_features, 196 - unsigned required_features); 195 + u64 supported_features, 196 + u64 required_features); 197 197 extern u64 ceph_client_id(struct ceph_client *client); 198 198 extern void ceph_destroy_client(struct ceph_client *client); 199 199 extern int __ceph_open_session(struct ceph_client *client,
+5 -5
include/linux/ceph/messenger.h
··· 60 60 u32 global_seq; 61 61 spinlock_t global_seq_lock; 62 62 63 - u32 supported_features; 64 - u32 required_features; 63 + u64 supported_features; 64 + u64 required_features; 65 65 }; 66 66 67 67 enum ceph_msg_data_type { ··· 192 192 193 193 struct ceph_entity_name peer_name; /* peer name */ 194 194 195 - unsigned peer_features; 195 + u64 peer_features; 196 196 u32 connect_seq; /* identify the most recent connection 197 197 attempt for this connection, client */ 198 198 u32 peer_global_seq; /* peer's global seq for this connection */ ··· 256 256 257 257 extern void ceph_messenger_init(struct ceph_messenger *msgr, 258 258 struct ceph_entity_addr *myaddr, 259 - u32 supported_features, 260 - u32 required_features, 259 + u64 supported_features, 260 + u64 required_features, 261 261 bool nocrc); 262 262 263 263 extern void ceph_con_init(struct ceph_connection *con, void *private,
+2 -2
net/ceph/ceph_common.c
··· 461 461 * create a fresh client instance 462 462 */ 463 463 struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private, 464 - unsigned int supported_features, 465 - unsigned int required_features) 464 + u64 supported_features, 465 + u64 required_features) 466 466 { 467 467 struct ceph_client *client; 468 468 struct ceph_entity_addr *myaddr = NULL;
+2 -2
net/ceph/messenger.c
··· 2853 2853 */ 2854 2854 void ceph_messenger_init(struct ceph_messenger *msgr, 2855 2855 struct ceph_entity_addr *myaddr, 2856 - u32 supported_features, 2857 - u32 required_features, 2856 + u64 supported_features, 2857 + u64 required_features, 2858 2858 bool nocrc) 2859 2859 { 2860 2860 msgr->supported_features = supported_features;