return oldest/first release that supports these features */
| 174 | |
| 175 | /* return oldest/first release that supports these features */ |
| 176 | int ceph_release_from_features(uint64_t features) |
| 177 | { |
| 178 | int r = 1; |
| 179 | while (true) { |
| 180 | uint64_t need = ceph_release_features(r); |
| 181 | if ((need & features) != need || |
| 182 | r == CEPH_RELEASE_MAX) { |
| 183 | r--; |
| 184 | need = ceph_release_features(r); |
| 185 | /* we want the first release that looks like this */ |
| 186 | while (r > 1 && ceph_release_features(r - 1) == need) { |
| 187 | r--; |
| 188 | } |
| 189 | break; |
| 190 | } |
| 191 | ++r; |
| 192 | } |
| 193 | return r; |
| 194 | } |
| 195 | |
| 196 | const char *ceph_osd_watch_op_name(int o) |
| 197 | { |