]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: crush_location infrastructure
authorIlya Dryomov <idryomov@gmail.com>
Fri, 22 May 2020 13:24:53 +0000 (15:24 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Jun 2020 11:22:53 +0000 (13:22 +0200)
commitf5c30f84cbb09e492dc5e1ce3022a30780d154a0
treec76d86a35c3aa9b67112060635093369d20b577c
parentca5c96243ede8b2763783efb5111bf4328a94720
libceph: crush_location infrastructure

Allow expressing client's location in terms of CRUSH hierarchy as
a set of (bucket type name, bucket name) pairs.  The userspace syntax
"crush_location = key1=value1 key2=value2" is incompatible with mount
options and needed adaptation.  Key-value pairs are separated by '|'
and we use ':' instead of '=' to separate keys from values.  So for:

  crush_location = host=foo rack=bar

one would write:

  crush_location=host:foo|rack:bar

As in userspace, "multipath" locations are supported, so indicating
locality for parallel hierarchies is possible:

  crush_location=rack:foo1|rack:foo2|datacenter:bar

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
include/linux/ceph/libceph.h
include/linux/ceph/osdmap.h
net/ceph/ceph_common.c
net/ceph/osdmap.c