diff options
Diffstat (limited to 'include/linux/ceph')
| -rw-r--r-- | include/linux/ceph/auth.h | 8 | ||||
| -rw-r--r-- | include/linux/ceph/ceph_features.h | 7 | ||||
| -rw-r--r-- | include/linux/ceph/decode.h | 18 | ||||
| -rw-r--r-- | include/linux/ceph/messenger.h | 8 | ||||
| -rw-r--r-- | include/linux/ceph/msgr.h | 2 | ||||
| -rw-r--r-- | include/linux/ceph/osd_client.h | 10 | ||||
| -rw-r--r-- | include/linux/ceph/pagelist.h | 2 |
7 files changed, 36 insertions, 19 deletions
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index e931da8424a4..6728c2ee0205 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
| @@ -64,6 +64,10 @@ struct ceph_auth_client_ops { | |||
| 64 | /* ensure that an existing authorizer is up to date */ | 64 | /* ensure that an existing authorizer is up to date */ |
| 65 | int (*update_authorizer)(struct ceph_auth_client *ac, int peer_type, | 65 | int (*update_authorizer)(struct ceph_auth_client *ac, int peer_type, |
| 66 | struct ceph_auth_handshake *auth); | 66 | struct ceph_auth_handshake *auth); |
| 67 | int (*add_authorizer_challenge)(struct ceph_auth_client *ac, | ||
| 68 | struct ceph_authorizer *a, | ||
| 69 | void *challenge_buf, | ||
| 70 | int challenge_buf_len); | ||
| 67 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, | 71 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, |
| 68 | struct ceph_authorizer *a); | 72 | struct ceph_authorizer *a); |
| 69 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, | 73 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, |
| @@ -118,6 +122,10 @@ void ceph_auth_destroy_authorizer(struct ceph_authorizer *a); | |||
| 118 | extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac, | 122 | extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac, |
| 119 | int peer_type, | 123 | int peer_type, |
| 120 | struct ceph_auth_handshake *a); | 124 | struct ceph_auth_handshake *a); |
| 125 | int ceph_auth_add_authorizer_challenge(struct ceph_auth_client *ac, | ||
| 126 | struct ceph_authorizer *a, | ||
| 127 | void *challenge_buf, | ||
| 128 | int challenge_buf_len); | ||
| 121 | extern int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac, | 129 | extern int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac, |
| 122 | struct ceph_authorizer *a); | 130 | struct ceph_authorizer *a); |
| 123 | extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac, | 131 | extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac, |
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index 3901927cf6a0..6b92b3395fa9 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h | |||
| @@ -165,9 +165,9 @@ DEFINE_CEPH_FEATURE(58, 1, FS_FILE_LAYOUT_V2) // overlap | |||
| 165 | DEFINE_CEPH_FEATURE(59, 1, FS_BTIME) | 165 | DEFINE_CEPH_FEATURE(59, 1, FS_BTIME) |
| 166 | DEFINE_CEPH_FEATURE(59, 1, FS_CHANGE_ATTR) // overlap | 166 | DEFINE_CEPH_FEATURE(59, 1, FS_CHANGE_ATTR) // overlap |
| 167 | DEFINE_CEPH_FEATURE(59, 1, MSG_ADDR2) // overlap | 167 | DEFINE_CEPH_FEATURE(59, 1, MSG_ADDR2) // overlap |
| 168 | DEFINE_CEPH_FEATURE(60, 1, BLKIN_TRACING) // *do not share this bit* | 168 | DEFINE_CEPH_FEATURE(60, 1, OSD_RECOVERY_DELETES) // *do not share this bit* |
| 169 | DEFINE_CEPH_FEATURE(61, 1, CEPHX_V2) // *do not share this bit* | ||
| 169 | 170 | ||
| 170 | DEFINE_CEPH_FEATURE(61, 1, RESERVED2) // unused, but slow down! | ||
| 171 | DEFINE_CEPH_FEATURE(62, 1, RESERVED) // do not use; used as a sentinal | 171 | DEFINE_CEPH_FEATURE(62, 1, RESERVED) // do not use; used as a sentinal |
| 172 | DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facing | 172 | DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facing |
| 173 | 173 | ||
| @@ -210,7 +210,8 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin | |||
| 210 | CEPH_FEATURE_SERVER_JEWEL | \ | 210 | CEPH_FEATURE_SERVER_JEWEL | \ |
| 211 | CEPH_FEATURE_MON_STATEFUL_SUB | \ | 211 | CEPH_FEATURE_MON_STATEFUL_SUB | \ |
| 212 | CEPH_FEATURE_CRUSH_TUNABLES5 | \ | 212 | CEPH_FEATURE_CRUSH_TUNABLES5 | \ |
| 213 | CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING) | 213 | CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \ |
| 214 | CEPH_FEATURE_CEPHX_V2) | ||
| 214 | 215 | ||
| 215 | #define CEPH_FEATURES_REQUIRED_DEFAULT \ | 216 | #define CEPH_FEATURES_REQUIRED_DEFAULT \ |
| 216 | (CEPH_FEATURE_NOSRCADDR | \ | 217 | (CEPH_FEATURE_NOSRCADDR | \ |
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index d143ac8879c6..a6c2a48d42e0 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h | |||
| @@ -194,16 +194,22 @@ ceph_decode_skip_n(p, end, sizeof(u8), bad) | |||
| 194 | } while (0) | 194 | } while (0) |
| 195 | 195 | ||
| 196 | /* | 196 | /* |
| 197 | * struct ceph_timespec <-> struct timespec | 197 | * struct ceph_timespec <-> struct timespec64 |
| 198 | */ | 198 | */ |
| 199 | static inline void ceph_decode_timespec(struct timespec *ts, | 199 | static inline void ceph_decode_timespec64(struct timespec64 *ts, |
| 200 | const struct ceph_timespec *tv) | 200 | const struct ceph_timespec *tv) |
| 201 | { | 201 | { |
| 202 | ts->tv_sec = (__kernel_time_t)le32_to_cpu(tv->tv_sec); | 202 | /* |
| 203 | * This will still overflow in year 2106. We could extend | ||
| 204 | * the protocol to steal two more bits from tv_nsec to | ||
| 205 | * add three more 136 year epochs after that the way ext4 | ||
| 206 | * does if necessary. | ||
| 207 | */ | ||
| 208 | ts->tv_sec = (time64_t)le32_to_cpu(tv->tv_sec); | ||
| 203 | ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec); | 209 | ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec); |
| 204 | } | 210 | } |
| 205 | static inline void ceph_encode_timespec(struct ceph_timespec *tv, | 211 | static inline void ceph_encode_timespec64(struct ceph_timespec *tv, |
| 206 | const struct timespec *ts) | 212 | const struct timespec64 *ts) |
| 207 | { | 213 | { |
| 208 | tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); | 214 | tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); |
| 209 | tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec); | 215 | tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec); |
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index c7dfcb8a1fb2..fc2b4491ee0a 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
| @@ -31,6 +31,9 @@ struct ceph_connection_operations { | |||
| 31 | struct ceph_auth_handshake *(*get_authorizer) ( | 31 | struct ceph_auth_handshake *(*get_authorizer) ( |
| 32 | struct ceph_connection *con, | 32 | struct ceph_connection *con, |
| 33 | int *proto, int force_new); | 33 | int *proto, int force_new); |
| 34 | int (*add_authorizer_challenge)(struct ceph_connection *con, | ||
| 35 | void *challenge_buf, | ||
| 36 | int challenge_buf_len); | ||
| 34 | int (*verify_authorizer_reply) (struct ceph_connection *con); | 37 | int (*verify_authorizer_reply) (struct ceph_connection *con); |
| 35 | int (*invalidate_authorizer)(struct ceph_connection *con); | 38 | int (*invalidate_authorizer)(struct ceph_connection *con); |
| 36 | 39 | ||
| @@ -286,9 +289,8 @@ struct ceph_connection { | |||
| 286 | attempt for this connection, client */ | 289 | attempt for this connection, client */ |
| 287 | u32 peer_global_seq; /* peer's global seq for this connection */ | 290 | u32 peer_global_seq; /* peer's global seq for this connection */ |
| 288 | 291 | ||
| 292 | struct ceph_auth_handshake *auth; | ||
| 289 | int auth_retry; /* true if we need a newer authorizer */ | 293 | int auth_retry; /* true if we need a newer authorizer */ |
| 290 | void *auth_reply_buf; /* where to put the authorizer reply */ | ||
| 291 | int auth_reply_buf_len; | ||
| 292 | 294 | ||
| 293 | struct mutex mutex; | 295 | struct mutex mutex; |
| 294 | 296 | ||
| @@ -330,7 +332,7 @@ struct ceph_connection { | |||
| 330 | int in_base_pos; /* bytes read */ | 332 | int in_base_pos; /* bytes read */ |
| 331 | __le64 in_temp_ack; /* for reading an ack */ | 333 | __le64 in_temp_ack; /* for reading an ack */ |
| 332 | 334 | ||
| 333 | struct timespec last_keepalive_ack; /* keepalive2 ack stamp */ | 335 | struct timespec64 last_keepalive_ack; /* keepalive2 ack stamp */ |
| 334 | 336 | ||
| 335 | struct delayed_work work; /* send|recv work */ | 337 | struct delayed_work work; /* send|recv work */ |
| 336 | unsigned long delay; /* current delay interval */ | 338 | unsigned long delay; /* current delay interval */ |
diff --git a/include/linux/ceph/msgr.h b/include/linux/ceph/msgr.h index 73ae2a926548..9e50aede46c8 100644 --- a/include/linux/ceph/msgr.h +++ b/include/linux/ceph/msgr.h | |||
| @@ -91,7 +91,7 @@ struct ceph_entity_inst { | |||
| 91 | #define CEPH_MSGR_TAG_SEQ 13 /* 64-bit int follows with seen seq number */ | 91 | #define CEPH_MSGR_TAG_SEQ 13 /* 64-bit int follows with seen seq number */ |
| 92 | #define CEPH_MSGR_TAG_KEEPALIVE2 14 /* keepalive2 byte + ceph_timespec */ | 92 | #define CEPH_MSGR_TAG_KEEPALIVE2 14 /* keepalive2 byte + ceph_timespec */ |
| 93 | #define CEPH_MSGR_TAG_KEEPALIVE2_ACK 15 /* keepalive2 reply */ | 93 | #define CEPH_MSGR_TAG_KEEPALIVE2_ACK 15 /* keepalive2 reply */ |
| 94 | 94 | #define CEPH_MSGR_TAG_CHALLENGE_AUTHORIZER 16 /* cephx v2 doing server challenge */ | |
| 95 | 95 | ||
| 96 | /* | 96 | /* |
| 97 | * connection negotiation | 97 | * connection negotiation |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 0d6ee04b4c41..02096da01845 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -199,7 +199,7 @@ struct ceph_osd_request { | |||
| 199 | /* set by submitter */ | 199 | /* set by submitter */ |
| 200 | u64 r_snapid; /* for reads, CEPH_NOSNAP o/w */ | 200 | u64 r_snapid; /* for reads, CEPH_NOSNAP o/w */ |
| 201 | struct ceph_snap_context *r_snapc; /* for writes */ | 201 | struct ceph_snap_context *r_snapc; /* for writes */ |
| 202 | struct timespec r_mtime; /* ditto */ | 202 | struct timespec64 r_mtime; /* ditto */ |
| 203 | u64 r_data_offset; /* ditto */ | 203 | u64 r_data_offset; /* ditto */ |
| 204 | bool r_linger; /* don't resend on failure */ | 204 | bool r_linger; /* don't resend on failure */ |
| 205 | 205 | ||
| @@ -253,7 +253,7 @@ struct ceph_osd_linger_request { | |||
| 253 | struct ceph_osd_request_target t; | 253 | struct ceph_osd_request_target t; |
| 254 | u32 map_dne_bound; | 254 | u32 map_dne_bound; |
| 255 | 255 | ||
| 256 | struct timespec mtime; | 256 | struct timespec64 mtime; |
| 257 | 257 | ||
| 258 | struct kref kref; | 258 | struct kref kref; |
| 259 | struct mutex lock; | 259 | struct mutex lock; |
| @@ -508,7 +508,7 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, | |||
| 508 | struct ceph_snap_context *sc, | 508 | struct ceph_snap_context *sc, |
| 509 | u64 off, u64 len, | 509 | u64 off, u64 len, |
| 510 | u32 truncate_seq, u64 truncate_size, | 510 | u32 truncate_seq, u64 truncate_size, |
| 511 | struct timespec *mtime, | 511 | struct timespec64 *mtime, |
| 512 | struct page **pages, int nr_pages); | 512 | struct page **pages, int nr_pages); |
| 513 | 513 | ||
| 514 | /* watch/notify */ | 514 | /* watch/notify */ |
| @@ -528,12 +528,12 @@ int ceph_osdc_notify_ack(struct ceph_osd_client *osdc, | |||
| 528 | u64 notify_id, | 528 | u64 notify_id, |
| 529 | u64 cookie, | 529 | u64 cookie, |
| 530 | void *payload, | 530 | void *payload, |
| 531 | size_t payload_len); | 531 | u32 payload_len); |
| 532 | int ceph_osdc_notify(struct ceph_osd_client *osdc, | 532 | int ceph_osdc_notify(struct ceph_osd_client *osdc, |
| 533 | struct ceph_object_id *oid, | 533 | struct ceph_object_id *oid, |
| 534 | struct ceph_object_locator *oloc, | 534 | struct ceph_object_locator *oloc, |
| 535 | void *payload, | 535 | void *payload, |
| 536 | size_t payload_len, | 536 | u32 payload_len, |
| 537 | u32 timeout, | 537 | u32 timeout, |
| 538 | struct page ***preply_pages, | 538 | struct page ***preply_pages, |
| 539 | size_t *preply_len); | 539 | size_t *preply_len); |
diff --git a/include/linux/ceph/pagelist.h b/include/linux/ceph/pagelist.h index 7edcded07641..d0223364349f 100644 --- a/include/linux/ceph/pagelist.h +++ b/include/linux/ceph/pagelist.h | |||
| @@ -68,7 +68,7 @@ static inline int ceph_pagelist_encode_8(struct ceph_pagelist *pl, u8 v) | |||
| 68 | return ceph_pagelist_append(pl, &v, 1); | 68 | return ceph_pagelist_append(pl, &v, 1); |
| 69 | } | 69 | } |
| 70 | static inline int ceph_pagelist_encode_string(struct ceph_pagelist *pl, | 70 | static inline int ceph_pagelist_encode_string(struct ceph_pagelist *pl, |
| 71 | char *s, size_t len) | 71 | char *s, u32 len) |
| 72 | { | 72 | { |
| 73 | int ret = ceph_pagelist_encode_32(pl, len); | 73 | int ret = ceph_pagelist_encode_32(pl, len); |
| 74 | if (ret) | 74 | if (ret) |
