All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Dryomov <idryomov@gmail.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: Ceph Development <ceph-devel@vger.kernel.org>,
	Josh Durgin <jdurgin@redhat.com>, Sage Weil <sage@redhat.com>,
	Jason Dillaman <dillaman@redhat.com>,
	Patrick Donnelly <pdonnell@redhat.com>
Subject: Re: [PATCH v2 3/5] libceph: crush_location infrastructure
Date: Sun, 31 May 2020 23:07:13 +0200	[thread overview]
Message-ID: <CAOi1vP_r5YF5i35d416OY8Uy4TaW2cQz1FfT_6NA0nhJfTNCrQ@mail.gmail.com> (raw)
In-Reply-To: <5b152390be256d3ae93933baf9cf84fa4e5f001f.camel@kernel.org>

On Sun, May 31, 2020 at 3:27 PM Jeff Layton <jlayton@kernel.org> wrote:
>
> On Sat, 2020-05-30 at 17:34 +0200, Ilya Dryomov wrote:
> > 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
> >
>
> This looks much nicer.
>
> The only caveat I have is that using '|' means that you'll need to quote
> or escape the option string on the command line or in shell scripts
> (lest the shell consider it a pipeline directive).
>
> It's hard to find ascii special characters that don't have _some_
> special meaning however. '/' would fill the bill, but I understand what
> you mean about that having connotations of a pathname.

Yeah, the problem with '/' is that crush_location of the form
"host:foo/rack:bar/row:baz" is not a path to the root of the tree,
but rather just a set of nodes: foo, bar and baz can belong to
completely different subtrees and would be matched independent of
each other.  The only reason that is not ambiguous is that CRUSH
enforces globally unique bucket names.

Having to escape is unfortunate, but I thought it was a (slightly)
lesser evil.  If folks think that '/' isn't that confusing or have
other ideas, now is the time to speak up!

Thanks,

                Ilya

  reply	other threads:[~2020-05-31 21:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 15:34 [PATCH v2 0/5] libceph: support for replica reads Ilya Dryomov
2020-05-30 15:34 ` [PATCH v2 1/5] libceph: add non-asserting rbtree insertion helper Ilya Dryomov
2020-05-30 15:34 ` [PATCH v2 2/5] libceph: decode CRUSH device/bucket types and names Ilya Dryomov
2020-06-01 10:49   ` Jeff Layton
2020-06-01 11:14     ` Ilya Dryomov
2020-05-30 15:34 ` [PATCH v2 3/5] libceph: crush_location infrastructure Ilya Dryomov
2020-05-31 13:27   ` Jeff Layton
2020-05-31 21:07     ` Ilya Dryomov [this message]
2020-05-30 15:34 ` [PATCH v2 4/5] libceph: support for balanced and localized reads Ilya Dryomov
2020-05-30 15:34 ` [PATCH v2 5/5] libceph: read_from_replica option Ilya Dryomov
2020-06-01 10:57 ` [PATCH v2 0/5] libceph: support for replica reads Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOi1vP_r5YF5i35d416OY8Uy4TaW2cQz1FfT_6NA0nhJfTNCrQ@mail.gmail.com \
    --to=idryomov@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dillaman@redhat.com \
    --cc=jdurgin@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=pdonnell@redhat.com \
    --cc=sage@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.