aboutsummaryrefslogtreecommitdiff
path: root/net/ceph/osdmap.c
diff options
context:
space:
mode:
authorGravatar Ilya Dryomov <idryomov@gmail.com> 2017-06-15 16:30:54 +0200
committerGravatar Ilya Dryomov <idryomov@gmail.com> 2017-07-07 17:25:16 +0200
commit7de030d6b10a56e991312a978ace6be3c090097c (patch)
tree216a8491662a79544bf10879b8d6eb0d9b6f3be4 /net/ceph/osdmap.c
parentlibceph: drop need_resend from calc_target() (diff)
downloadlinux-7de030d6b10a56e991312a978ace6be3c090097c.tar.gz
linux-7de030d6b10a56e991312a978ace6be3c090097c.tar.bz2
linux-7de030d6b10a56e991312a978ace6be3c090097c.zip
libceph: resend on PG splits if OSD has RESEND_ON_SPLIT
Note that ceph_osd_request_target fields are updated regardless of RESEND_ON_SPLIT. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/osdmap.c')
-rw-r--r--net/ceph/osdmap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index a4155620eace..367879afed58 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -1753,9 +1753,8 @@ void ceph_osds_copy(struct ceph_osds *dest, const struct ceph_osds *src)
dest->primary = src->primary;
}
-static bool is_split(const struct ceph_pg *pgid,
- u32 old_pg_num,
- u32 new_pg_num)
+bool ceph_pg_is_split(const struct ceph_pg *pgid, u32 old_pg_num,
+ u32 new_pg_num)
{
int old_bits = calc_bits_of(old_pg_num);
int old_mask = (1 << old_bits) - 1;
@@ -1800,7 +1799,7 @@ bool ceph_is_new_interval(const struct ceph_osds *old_acting,
!osds_equal(old_up, new_up) ||
old_size != new_size ||
old_min_size != new_min_size ||
- is_split(pgid, old_pg_num, new_pg_num) ||
+ ceph_pg_is_split(pgid, old_pg_num, new_pg_num) ||
old_sort_bitwise != new_sort_bitwise;
}