mbox series

[v2,0/4] ceph: new mount device syntax

Message ID 20210702064821.148063-1-vshankar@redhat.com (mailing list archive)
Headers show
Series ceph: new mount device syntax | expand

Message

Venky Shankar July 2, 2021, 6:48 a.m. UTC
v2:
 - doc suggestions/fixes by Jeff
 - parse_fsid -> ceph_parse_fsid
 - avoid kstrdup whereever possible, also fixes a memleak
 - fail mount when mon_addr is unavailable (for new syntax)
 - use dout() instead of invalfc() during new syntax check

This series introduces changes Ceph File System mount device string.
Old mount device syntax (source) has the following problems:

mounts to the same cluster but with different fsnames
and/or creds have identical device string which can
confuse xfstests.

Userspace mount helper tool resolves monitor addresses
and fill in mon addrs automatically, but that means the
device shown in /proc/mounts is different than what was
used for mounting.

New device syntax is as follows:

  cephuser@fsid.mycephfs2=/path

Note, there is no "monitor address" in the device string.
That gets passed in as mount option. This keeps the device
string same when monitor addresses change (on remounts).

Also note that the userspace mount helper tool is backward
compatible. I.e., the mount helper will fallback to using
old syntax after trying to mount with the new syntax.

Venky Shankar (4):
  ceph: new device mount syntax
  ceph: validate cluster FSID for new device syntax
  ceph: record updated mon_addr on remount
  doc: document new CephFS mount device syntax

 Documentation/filesystems/ceph.rst |  25 +++++-
 fs/ceph/super.c                    | 137 ++++++++++++++++++++++++++---
 fs/ceph/super.h                    |   4 +
 include/linux/ceph/libceph.h       |   1 +
 net/ceph/ceph_common.c             |   5 +-
 5 files changed, 157 insertions(+), 15 deletions(-)

Comments

Patrick Donnelly July 2, 2021, 6:05 p.m. UTC | #1
On Thu, Jul 1, 2021 at 11:48 PM Venky Shankar <vshankar@redhat.com> wrote:
> Also note that the userspace mount helper tool is backward
> compatible. I.e., the mount helper will fallback to using
> old syntax after trying to mount with the new syntax.

The kernel is also backwards compatible too, right?
Venky Shankar July 5, 2021, 4:36 a.m. UTC | #2
On Fri, Jul 2, 2021 at 11:36 PM Patrick Donnelly <pdonnell@redhat.com> wrote:
>
> On Thu, Jul 1, 2021 at 11:48 PM Venky Shankar <vshankar@redhat.com> wrote:
> > Also note that the userspace mount helper tool is backward
> > compatible. I.e., the mount helper will fallback to using
> > old syntax after trying to mount with the new syntax.
>
> The kernel is also backwards compatible too, right?

Yes.

>
> --
> Patrick Donnelly, Ph.D.
> He / Him / His
> Principal Software Engineer
> Red Hat Sunnyvale, CA
> GPG: 19F28A586F808C2402351B93C3301A3E258DD79D
>