diff options
author | Xiubo Li <xiubli@redhat.com> | 2019-12-20 17:34:04 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-01-27 18:53:40 +0300 |
commit | 4fbc0c711b2464ee1551850b85002faae0b775d5 (patch) | |
tree | abbe49b9ab11ac1a764c59d7d620084c7acf4198 /fs/ceph/mds_client.h | |
parent | b38c9eb4757d5bac1eb8634a9516ef918fca2525 (diff) | |
download | linux-4fbc0c711b2464ee1551850b85002faae0b775d5.tar.xz |
ceph: remove the extra slashes in the server path
It's possible to pass the mount helper a server path that has more
than one contiguous slash character. For example:
$ mount -t ceph 192.168.195.165:40176:/// /mnt/cephfs/
In the MDS server side the extra slashes of the server path will be
treated as snap dir, and then we can get the following debug logs:
ceph: mount opening path //
ceph: open_root_inode opening '//'
ceph: fill_trace 0000000059b8a3bc is_dentry 0 is_target 1
ceph: alloc_inode 00000000dc4ca00b
ceph: get_inode created new inode 00000000dc4ca00b 1.ffffffffffffffff ino 1
ceph: get_inode on 1=1.ffffffffffffffff got 00000000dc4ca00b
And then when creating any new file or directory under the mount
point, we can hit the following BUG_ON in ceph_fill_trace():
BUG_ON(ceph_snap(dir) != dvino.snap);
Have the client ignore the extra slashes in the server path when
mounting. This will also canonicalize the path, so that identical mounts
can be consilidated.
1) "//mydir1///mydir//"
2) "/mydir1/mydir"
3) "/mydir1/mydir/"
Regardless of the internal treatment of these paths, the kernel still
stores the original string including the leading '/' for presentation
to userland.
URL: https://tracker.ceph.com/issues/42771
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
0 files changed, 0 insertions, 0 deletions