aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/debugfs.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2020-05-23 11:45:48 +0200
committerIlya Dryomov <idryomov@gmail.com>2020-06-01 13:22:53 +0200
commit117d96a04f007ce8fc2e292369056c3bd09f6f63 (patch)
tree8fb67a4f204be96d285341aff9bffce670ce2930 /net/ceph/debugfs.c
parentlibceph: crush_location infrastructure (diff)
downloadlinux-dev-117d96a04f007ce8fc2e292369056c3bd09f6f63.tar.xz
linux-dev-117d96a04f007ce8fc2e292369056c3bd09f6f63.zip
libceph: support for balanced and localized reads
OSD-side issues with reads from replica have been resolved in Octopus. Reading from replica should be safe wrt. unstable or uncommitted state now, so add support for balanced and localized reads. There are two cases when a read from replica can't be served: - OSD may silently drop the request, expecting the client to notice that the acting set has changed and resend via the usual means (handled with t->used_replica) - OSD may return EAGAIN, expecting the client to resend to the primary, ignoring replica read flags (see handle_reply()) Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'net/ceph/debugfs.c')
-rw-r--r--net/ceph/debugfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c
index 1344f232ecc5..409d505ff320 100644
--- a/net/ceph/debugfs.c
+++ b/net/ceph/debugfs.c
@@ -81,11 +81,13 @@ static int osdmap_show(struct seq_file *s, void *p)
u32 state = map->osd_state[i];
char sb[64];
- seq_printf(s, "osd%d\t%s\t%3d%%\t(%s)\t%3d%%\n",
+ seq_printf(s, "osd%d\t%s\t%3d%%\t(%s)\t%3d%%\t%2d\n",
i, ceph_pr_addr(addr),
((map->osd_weight[i]*100) >> 16),
ceph_osdmap_state_str(sb, sizeof(sb), state),
- ((ceph_get_primary_affinity(map, i)*100) >> 16));
+ ((ceph_get_primary_affinity(map, i)*100) >> 16),
+ ceph_get_crush_locality(map, i,
+ &client->options->crush_locs));
}
for (n = rb_first(&map->pg_temp); n; n = rb_next(n)) {
struct ceph_pg_mapping *pg =