From: Venky Shankar <vshankar@redhat.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: Patrick Donnelly <pdonnell@redhat.com>,
ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: [RFC 0/2] ceph: add debugfs entries signifying new mount syntax support
Date: Wed, 18 Aug 2021 18:47:05 +0530 [thread overview]
Message-ID: <CACPzV1niGaDtZfmVi8C4uQex1UhSkyc7GGEj0Q6Ln1qRufRGdg@mail.gmail.com> (raw)
In-Reply-To: <68e7fb33b9ed652847a95af49f38654780fdbe20.camel@redhat.com>
On Wed, Aug 18, 2021 at 6:39 PM Jeff Layton <jlayton@redhat.com> wrote:
>
> On Wed, 2021-08-18 at 11:31 +0530, Venky Shankar wrote:
> > [This is based on top of new mount syntax series]
> >
> > Patrick proposed the idea of having debugfs entries to signify if
> > kernel supports the new (v2) mount syntax. The primary use of this
> > information is to catch any bugs in the new syntax implementation.
> >
> > This would be done as follows::
> >
> > The userspace mount helper tries to mount using the new mount syntax
> > and fallsback to using old syntax if the mount using new syntax fails.
> > However, a bug in the new mount syntax implementation can silently
> > result in the mount helper switching to old syntax.
> >
>
> Is this a known bug you're talking about or are you just speculating
> about the potential for bugs there?
Potential bugs.
>
> > So, the debugfs entries can be relied upon by the mount helper to
> > check if the kernel supports the new mount syntax. Cases when the
> > mount using the new syntax fails, but the kernel does support the
> > new mount syntax, the mount helper could probably log before switching
> > to the old syntax (or fail the mount altogether when run in test mode).
> >
> > Debugfs entries are as follows::
> >
> > /sys/kernel/debug/ceph/
> > ....
> > ....
> > /sys/kernel/debug/ceph/dev_support
> > /sys/kernel/debug/ceph/dev_support/v2
> > ....
> > ....
> >
> > Note that there is no entry signifying v1 mount syntax. That's because
> > the kernel still supports mounting with old syntax and older kernels do
> > not have debug entries for the same.
> >
> > Venky Shankar (2):
> > ceph: add helpers to create/cleanup debugfs sub-directories under
> > "ceph" directory
> > ceph: add debugfs entries for v2 (new) mount syntax support
> >
> > fs/ceph/debugfs.c | 28 ++++++++++++++++++++++++++++
> > fs/ceph/super.c | 3 +++
> > fs/ceph/super.h | 2 ++
> > include/linux/ceph/debugfs.h | 3 +++
> > net/ceph/debugfs.c | 26 ++++++++++++++++++++++++--
> > 5 files changed, 60 insertions(+), 2 deletions(-)
> >
>
> I'm not a huge fan of this approach overall as it requires that you have
> access to debugfs, and that's not guaranteed to be available everywhere.
> If you want to add this for debugging purposes, that's fine, but I don't
> think you want the mount helper to rely on this infrastructure.
Right. The use-case here is probably to rely on it during teuthology
tests where the mount fails (and the tests) when using the new syntax
but the kernel has v2 syntax support.
I recall the discussion on having some sort of `--no-fallback` option
to not fall-back to old syntax, but since we have the debugfs entries,
we may as well rely on those (at least for testing).
>
> --
> Jeff Layton <jlayton@redhat.com>
>
--
Cheers,
Venky
next prev parent reply other threads:[~2021-08-18 13:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 6:01 [RFC 0/2] ceph: add debugfs entries signifying new mount syntax support Venky Shankar
2021-08-18 6:01 ` [RFC 1/2] ceph: add helpers to create/cleanup debugfs sub-directories under "ceph" directory Venky Shankar
2021-08-18 11:34 ` Venky Shankar
2021-08-18 6:01 ` [RFC 2/2] ceph: add debugfs entries for v2 (new) mount syntax support Venky Shankar
2021-08-21 1:52 ` Patrick Donnelly
2021-08-23 4:45 ` Venky Shankar
2021-08-23 5:31 ` Venky Shankar
2021-08-23 10:32 ` Jeff Layton
2021-08-18 13:09 ` [RFC 0/2] ceph: add debugfs entries signifying new " Jeff Layton
2021-08-18 13:17 ` Venky Shankar [this message]
2021-08-18 13:23 ` 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=CACPzV1niGaDtZfmVi8C4uQex1UhSkyc7GGEj0Q6Ln1qRufRGdg@mail.gmail.com \
--to=vshankar@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=jlayton@redhat.com \
--cc=pdonnell@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).