Skip to content

Commit 12b4629

Browse files
committed
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>
1 parent e37180c commit 12b4629

6 files changed

Lines changed: 22 additions & 22 deletions

File tree

‎fs/ceph/mds_client.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static const struct ceph_connection_operations mds_con_ops;
6363
*/
6464
static int parse_reply_info_in(void **p, void *end,
6565
struct ceph_mds_reply_info_in *info,
66-
int features)
66+
u64 features)
6767
{
6868
int err = -EIO;
6969

@@ -98,7 +98,7 @@ static int parse_reply_info_in(void **p, void *end,
9898
*/
9999
static int parse_reply_info_trace(void **p, void *end,
100100
struct ceph_mds_reply_info_parsed *info,
101-
int features)
101+
u64 features)
102102
{
103103
int err;
104104

@@ -145,7 +145,7 @@ static int parse_reply_info_trace(void **p, void *end,
145145
*/
146146
static int parse_reply_info_dir(void **p, void *end,
147147
struct ceph_mds_reply_info_parsed *info,
148-
int features)
148+
u64 features)
149149
{
150150
u32 num, i = 0;
151151
int err;
@@ -217,7 +217,7 @@ static int parse_reply_info_dir(void **p, void *end,
217217
*/
218218
static int parse_reply_info_filelock(void **p, void *end,
219219
struct ceph_mds_reply_info_parsed *info,
220-
int features)
220+
u64 features)
221221
{
222222
if (*p + sizeof(*info->filelock_reply) > end)
223223
goto bad;
@@ -238,7 +238,7 @@ static int parse_reply_info_filelock(void **p, void *end,
238238
*/
239239
static int parse_reply_info_create(void **p, void *end,
240240
struct ceph_mds_reply_info_parsed *info,
241-
int features)
241+
u64 features)
242242
{
243243
if (features & CEPH_FEATURE_REPLY_CREATE_INODE) {
244244
if (*p == end) {
@@ -262,7 +262,7 @@ static int parse_reply_info_create(void **p, void *end,
262262
*/
263263
static int parse_reply_info_extra(void **p, void *end,
264264
struct ceph_mds_reply_info_parsed *info,
265-
int features)
265+
u64 features)
266266
{
267267
if (info->head->op == CEPH_MDS_OP_GETFILELOCK)
268268
return parse_reply_info_filelock(p, end, info, features);
@@ -280,7 +280,7 @@ static int parse_reply_info_extra(void **p, void *end,
280280
*/
281281
static int parse_reply_info(struct ceph_msg *msg,
282282
struct ceph_mds_reply_info_parsed *info,
283-
int features)
283+
u64 features)
284284
{
285285
void *p, *end;
286286
u32 len;

‎fs/ceph/super.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
490490
struct ceph_options *opt)
491491
{
492492
struct ceph_fs_client *fsc;
493-
const unsigned supported_features =
493+
const u64 supported_features =
494494
CEPH_FEATURE_FLOCK |
495495
CEPH_FEATURE_DIRLAYOUTHASH;
496-
const unsigned required_features = 0;
496+
const u64 required_features = 0;
497497
int page_count;
498498
size_t size;
499499
int err = -ENOMEM;

‎include/linux/ceph/libceph.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ struct ceph_client {
122122

123123
int (*extra_mon_dispatch)(struct ceph_client *, struct ceph_msg *);
124124

125-
u32 supported_features;
126-
u32 required_features;
125+
u64 supported_features;
126+
u64 required_features;
127127

128128
struct ceph_messenger msgr; /* messenger instance */
129129
struct ceph_mon_client monc;
@@ -192,8 +192,8 @@ extern int ceph_compare_options(struct ceph_options *new_opt,
192192
struct ceph_client *client);
193193
extern struct ceph_client *ceph_create_client(struct ceph_options *opt,
194194
void *private,
195-
unsigned supported_features,
196-
unsigned required_features);
195+
u64 supported_features,
196+
u64 required_features);
197197
extern u64 ceph_client_id(struct ceph_client *client);
198198
extern void ceph_destroy_client(struct ceph_client *client);
199199
extern int __ceph_open_session(struct ceph_client *client,

‎include/linux/ceph/messenger.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ struct ceph_messenger {
6060
u32 global_seq;
6161
spinlock_t global_seq_lock;
6262

63-
u32 supported_features;
64-
u32 required_features;
63+
u64 supported_features;
64+
u64 required_features;
6565
};
6666

6767
enum ceph_msg_data_type {
@@ -192,7 +192,7 @@ struct ceph_connection {
192192

193193
struct ceph_entity_name peer_name; /* peer name */
194194

195-
unsigned peer_features;
195+
u64 peer_features;
196196
u32 connect_seq; /* identify the most recent connection
197197
attempt for this connection, client */
198198
u32 peer_global_seq; /* peer's global seq for this connection */
@@ -256,8 +256,8 @@ extern void ceph_msgr_flush(void);
256256

257257
extern void ceph_messenger_init(struct ceph_messenger *msgr,
258258
struct ceph_entity_addr *myaddr,
259-
u32 supported_features,
260-
u32 required_features,
259+
u64 supported_features,
260+
u64 required_features,
261261
bool nocrc);
262262

263263
extern void ceph_con_init(struct ceph_connection *con, void *private,

‎net/ceph/ceph_common.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ EXPORT_SYMBOL(ceph_client_id);
461461
* create a fresh client instance
462462
*/
463463
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)
466466
{
467467
struct ceph_client *client;
468468
struct ceph_entity_addr *myaddr = NULL;

‎net/ceph/messenger.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,8 +2853,8 @@ static void con_fault(struct ceph_connection *con)
28532853
*/
28542854
void ceph_messenger_init(struct ceph_messenger *msgr,
28552855
struct ceph_entity_addr *myaddr,
2856-
u32 supported_features,
2857-
u32 required_features,
2856+
u64 supported_features,
2857+
u64 required_features,
28582858
bool nocrc)
28592859
{
28602860
msgr->supported_features = supported_features;

0 commit comments

Comments
 (0)