diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-07-27 11:59:14 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-08-01 10:46:45 -0400 |
commit | ae78dd8139ce93a528beb7f3914531b7a7be9e30 (patch) | |
tree | 69c4997dcbd64a8c1912e442a3444325714ce2e6 /net | |
parent | f53b7665c8cec40c8a638b55ee098b721e6be20c (diff) |
libceph: make RECOVERY_DELETES feature create a new interval
This is needed so that the OSDs can regenerate the missing set at the
start of a new interval where support for recovery deletes changed.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 5 | ||||
-rw-r--r-- | net/ceph/osdmap.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index b5f016cb9569..dcfbdd74dfd1 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1337,6 +1337,8 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc, | |||
1337 | bool legacy_change; | 1337 | bool legacy_change; |
1338 | bool split = false; | 1338 | bool split = false; |
1339 | bool sort_bitwise = ceph_osdmap_flag(osdc, CEPH_OSDMAP_SORTBITWISE); | 1339 | bool sort_bitwise = ceph_osdmap_flag(osdc, CEPH_OSDMAP_SORTBITWISE); |
1340 | bool recovery_deletes = ceph_osdmap_flag(osdc, | ||
1341 | CEPH_OSDMAP_RECOVERY_DELETES); | ||
1340 | enum calc_target_result ct_res; | 1342 | enum calc_target_result ct_res; |
1341 | int ret; | 1343 | int ret; |
1342 | 1344 | ||
@@ -1399,6 +1401,8 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc, | |||
1399 | pi->pg_num, | 1401 | pi->pg_num, |
1400 | t->sort_bitwise, | 1402 | t->sort_bitwise, |
1401 | sort_bitwise, | 1403 | sort_bitwise, |
1404 | t->recovery_deletes, | ||
1405 | recovery_deletes, | ||
1402 | &last_pgid)) | 1406 | &last_pgid)) |
1403 | force_resend = true; | 1407 | force_resend = true; |
1404 | 1408 | ||
@@ -1421,6 +1425,7 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc, | |||
1421 | t->pg_num = pi->pg_num; | 1425 | t->pg_num = pi->pg_num; |
1422 | t->pg_num_mask = pi->pg_num_mask; | 1426 | t->pg_num_mask = pi->pg_num_mask; |
1423 | t->sort_bitwise = sort_bitwise; | 1427 | t->sort_bitwise = sort_bitwise; |
1428 | t->recovery_deletes = recovery_deletes; | ||
1424 | 1429 | ||
1425 | t->osd = acting.primary; | 1430 | t->osd = acting.primary; |
1426 | } | 1431 | } |
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 0bec71fa712e..f358d0bfa76b 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c | |||
@@ -2082,6 +2082,8 @@ bool ceph_is_new_interval(const struct ceph_osds *old_acting, | |||
2082 | u32 new_pg_num, | 2082 | u32 new_pg_num, |
2083 | bool old_sort_bitwise, | 2083 | bool old_sort_bitwise, |
2084 | bool new_sort_bitwise, | 2084 | bool new_sort_bitwise, |
2085 | bool old_recovery_deletes, | ||
2086 | bool new_recovery_deletes, | ||
2085 | const struct ceph_pg *pgid) | 2087 | const struct ceph_pg *pgid) |
2086 | { | 2088 | { |
2087 | return !osds_equal(old_acting, new_acting) || | 2089 | return !osds_equal(old_acting, new_acting) || |
@@ -2089,7 +2091,8 @@ bool ceph_is_new_interval(const struct ceph_osds *old_acting, | |||
2089 | old_size != new_size || | 2091 | old_size != new_size || |
2090 | old_min_size != new_min_size || | 2092 | old_min_size != new_min_size || |
2091 | ceph_pg_is_split(pgid, old_pg_num, new_pg_num) || | 2093 | ceph_pg_is_split(pgid, old_pg_num, new_pg_num) || |
2092 | old_sort_bitwise != new_sort_bitwise; | 2094 | old_sort_bitwise != new_sort_bitwise || |
2095 | old_recovery_deletes != new_recovery_deletes; | ||
2093 | } | 2096 | } |
2094 | 2097 | ||
2095 | static int calc_pg_rank(int osd, const struct ceph_osds *acting) | 2098 | static int calc_pg_rank(int osd, const struct ceph_osds *acting) |