diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-06-15 10:30:55 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-07-07 11:25:16 -0400 |
commit | db098ec4e41a6ad8f5b248b1287bb583754e944e (patch) | |
tree | 4dca99158235f9a7ba021717ff4d417843d1e04f | |
parent | 04c7d789e269c2b82bbd08106049a5a979cdb3fd (diff) |
libceph: always populate t->target_{oid,oloc} in calc_target()
need_check_tiering logic doesn't make a whole lot of sense. Drop it
and apply tiering unconditionally on every calc_target() call instead.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | net/ceph/osd_client.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 173ab9c68eb6..c050e28d3c97 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -1330,7 +1330,6 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc, | |||
1330 | bool unpaused = false; | 1330 | bool unpaused = false; |
1331 | bool legacy_change; | 1331 | bool legacy_change; |
1332 | bool split = false; | 1332 | bool split = false; |
1333 | bool need_check_tiering = false; | ||
1334 | bool sort_bitwise = ceph_osdmap_flag(osdc, CEPH_OSDMAP_SORTBITWISE); | 1333 | bool sort_bitwise = ceph_osdmap_flag(osdc, CEPH_OSDMAP_SORTBITWISE); |
1335 | enum calc_target_result ct_res; | 1334 | enum calc_target_result ct_res; |
1336 | int ret; | 1335 | int ret; |
@@ -1351,17 +1350,11 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc, | |||
1351 | force_resend = true; | 1350 | force_resend = true; |
1352 | } | 1351 | } |
1353 | } | 1352 | } |
1354 | if (ceph_oid_empty(&t->target_oid) || force_resend) { | ||
1355 | ceph_oid_copy(&t->target_oid, &t->base_oid); | ||
1356 | need_check_tiering = true; | ||
1357 | } | ||
1358 | if (ceph_oloc_empty(&t->target_oloc) || force_resend) { | ||
1359 | ceph_oloc_copy(&t->target_oloc, &t->base_oloc); | ||
1360 | need_check_tiering = true; | ||
1361 | } | ||
1362 | 1353 | ||
1363 | if (need_check_tiering && | 1354 | /* apply tiering */ |
1364 | (t->flags & CEPH_OSD_FLAG_IGNORE_OVERLAY) == 0) { | 1355 | ceph_oid_copy(&t->target_oid, &t->base_oid); |
1356 | ceph_oloc_copy(&t->target_oloc, &t->base_oloc); | ||
1357 | if ((t->flags & CEPH_OSD_FLAG_IGNORE_OVERLAY) == 0) { | ||
1365 | if (t->flags & CEPH_OSD_FLAG_READ && pi->read_tier >= 0) | 1358 | if (t->flags & CEPH_OSD_FLAG_READ && pi->read_tier >= 0) |
1366 | t->target_oloc.pool = pi->read_tier; | 1359 | t->target_oloc.pool = pi->read_tier; |
1367 | if (t->flags & CEPH_OSD_FLAG_WRITE && pi->write_tier >= 0) | 1360 | if (t->flags & CEPH_OSD_FLAG_WRITE && pi->write_tier >= 0) |