diff options
| -rw-r--r-- | include/linux/ceph/ceph_features.h | 5 | ||||
| -rw-r--r-- | net/ceph/osd_client.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index c3b211c9fe83..c1ef6f14e7be 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h | |||
| @@ -73,6 +73,8 @@ | |||
| 73 | #define CEPH_FEATURE_MON_STATEFUL_SUB (1ULL<<57) /* stateful mon subscription */ | 73 | #define CEPH_FEATURE_MON_STATEFUL_SUB (1ULL<<57) /* stateful mon subscription */ |
| 74 | #define CEPH_FEATURE_MON_ROUTE_OSDMAP (1ULL<<57) /* peon sends osdmaps */ | 74 | #define CEPH_FEATURE_MON_ROUTE_OSDMAP (1ULL<<57) /* peon sends osdmaps */ |
| 75 | #define CEPH_FEATURE_CRUSH_TUNABLES5 (1ULL<<58) /* chooseleaf stable mode */ | 75 | #define CEPH_FEATURE_CRUSH_TUNABLES5 (1ULL<<58) /* chooseleaf stable mode */ |
| 76 | // duplicated since it was introduced at the same time as CEPH_FEATURE_CRUSH_TUNABLES5 | ||
| 77 | #define CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING (1ULL<<58) /* New, v7 encoding */ | ||
| 76 | 78 | ||
| 77 | /* | 79 | /* |
| 78 | * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature | 80 | * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature |
| @@ -119,7 +121,8 @@ static inline u64 ceph_sanitize_features(u64 features) | |||
| 119 | CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \ | 121 | CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \ |
| 120 | CEPH_FEATURE_MSGR_KEEPALIVE2 | \ | 122 | CEPH_FEATURE_MSGR_KEEPALIVE2 | \ |
| 121 | CEPH_FEATURE_CRUSH_V4 | \ | 123 | CEPH_FEATURE_CRUSH_V4 | \ |
| 122 | CEPH_FEATURE_CRUSH_TUNABLES5) | 124 | CEPH_FEATURE_CRUSH_TUNABLES5 | \ |
| 125 | CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING) | ||
| 123 | 126 | ||
| 124 | #define CEPH_FEATURES_REQUIRED_DEFAULT \ | 127 | #define CEPH_FEATURES_REQUIRED_DEFAULT \ |
| 125 | (CEPH_FEATURE_NOSRCADDR | \ | 128 | (CEPH_FEATURE_NOSRCADDR | \ |
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index f8f235930d88..3534e12683d3 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
| @@ -1770,6 +1770,7 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
| 1770 | u32 osdmap_epoch; | 1770 | u32 osdmap_epoch; |
| 1771 | int already_completed; | 1771 | int already_completed; |
| 1772 | u32 bytes; | 1772 | u32 bytes; |
| 1773 | u8 decode_redir; | ||
| 1773 | unsigned int i; | 1774 | unsigned int i; |
| 1774 | 1775 | ||
| 1775 | tid = le64_to_cpu(msg->hdr.tid); | 1776 | tid = le64_to_cpu(msg->hdr.tid); |
| @@ -1841,6 +1842,15 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg) | |||
| 1841 | p += 8 + 4; /* skip replay_version */ | 1842 | p += 8 + 4; /* skip replay_version */ |
| 1842 | p += 8; /* skip user_version */ | 1843 | p += 8; /* skip user_version */ |
| 1843 | 1844 | ||
| 1845 | if (le16_to_cpu(msg->hdr.version) >= 7) | ||
| 1846 | ceph_decode_8_safe(&p, end, decode_redir, bad_put); | ||
| 1847 | else | ||
| 1848 | decode_redir = 1; | ||
| 1849 | } else { | ||
| 1850 | decode_redir = 0; | ||
| 1851 | } | ||
| 1852 | |||
| 1853 | if (decode_redir) { | ||
| 1844 | err = ceph_redirect_decode(&p, end, &redir); | 1854 | err = ceph_redirect_decode(&p, end, &redir); |
| 1845 | if (err) | 1855 | if (err) |
| 1846 | goto bad_put; | 1856 | goto bad_put; |
