<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ceph/super.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-04-13T08:32:57Z</updated>
<entry>
<title>ceph: canonicalize server path in place</title>
<updated>2020-04-13T08:32:57Z</updated>
<author>
<name>Ilya Dryomov</name>
</author>
<published>2020-02-10T21:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cccf9da6adebd2751f300f598559170c7a68b20'/>
<id>urn:sha1:1cccf9da6adebd2751f300f598559170c7a68b20</id>
<content type='text'>
commit b27a939e8376a3f1ed09b9c33ef44d20f18ec3d0 upstream.

syzbot reported that 4fbc0c711b24 ("ceph: remove the extra slashes in
the server path") had caused a regression where an allocation could be
done under a spinlock -- compare_mount_options() is called by sget_fc()
with sb_lock held.

We don't really need the supplied server path, so canonicalize it
in place and compare it directly.  To make this work, the leading
slash is kept around and the logic in ceph_real_mount() to skip it
is restored.  CEPH_MSG_CLIENT_SESSION now reports the same (i.e.
canonicalized) path, with the leading slash of course.

Fixes: 4fbc0c711b24 ("ceph: remove the extra slashes in the server path")
Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Luis Henriques &lt;lhenriques@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: remove the extra slashes in the server path</title>
<updated>2020-04-13T08:32:57Z</updated>
<author>
<name>Xiubo Li</name>
</author>
<published>2019-12-20T14:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68d87669cb58d538f49eafbbdc0fa302b6c7cb4f'/>
<id>urn:sha1:68d87669cb58d538f49eafbbdc0fa302b6c7cb4f</id>
<content type='text'>
commit 4fbc0c711b2464ee1551850b85002faae0b775d5 upstream.

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 &lt;xiubli@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Luis Henriques &lt;lhenriques@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: flush dirty inodes before proceeding with remount</title>
<updated>2019-05-25T16:26:49Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2019-05-07T13:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=304902e1f77dcd78bbe6f8fdaa1e68121e186f50'/>
<id>urn:sha1:304902e1f77dcd78bbe6f8fdaa1e68121e186f50</id>
<content type='text'>
commit 00abf69dd24f4444d185982379c5cc3bb7b6d1fc upstream.

xfstest generic/452 was triggering a "Busy inodes after umount" warning.
ceph was allowing the mount to go read-only without first flushing out
dirty inodes in the cache. Ensure we sync out the filesystem before
allowing a remount to proceed.

Cc: stable@vger.kernel.org
Link: http://tracker.ceph.com/issues/39571
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: fix dentry leak when failing to init debugfs</title>
<updated>2018-05-30T05:50:32Z</updated>
<author>
<name>Chengguang Xu</name>
</author>
<published>2018-02-09T12:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=087d268b76b2adedb9b39e101ebf4097c3b42730'/>
<id>urn:sha1:087d268b76b2adedb9b39e101ebf4097c3b42730</id>
<content type='text'>
[ Upstream commit 18106734b512664a8541026519ce4b862498b6c3 ]

When failing from ceph_fs_debugfs_init() in ceph_real_mount(),
there is lack of dput of root_dentry and it causes slab errors,
so change the calling order of ceph_fs_debugfs_init() and
open_root_dentry() and do some cleanups to avoid this issue.

Signed-off-by: Chengguang Xu &lt;cgxu519@icloud.com&gt;
Reviewed-by: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: fix uninitialized dentry pointer in ceph_real_mount()</title>
<updated>2016-10-18T10:10:59Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2016-10-13T15:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31ca58781019de191c7f520f0626ca76a88c1f6e'/>
<id>urn:sha1:31ca58781019de191c7f520f0626ca76a88c1f6e</id>
<content type='text'>
    fs/ceph/super.c: In function ‘ceph_real_mount’:
    fs/ceph/super.c:818: warning: ‘root’ may be used uninitialized in this function

If s_root is already valid, dentry pointer root is never initialized,
and returned by ceph_real_mount(). This will cause a crash later when
the caller dereferences the pointer.

Fixes: ce2728aaa82bbeba ("ceph: avoid accessing / when mounting a subpath")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: avoid accessing / when mounting a subpath</title>
<updated>2016-10-03T14:13:50Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-09-14T06:53:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce2728aaa82bbebae7d20345324af3f0f49eeb20'/>
<id>urn:sha1:ce2728aaa82bbebae7d20345324af3f0f49eeb20</id>
<content type='text'>
Accessing / causes failuire if the client has caps that restrict path

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: Mark the file cache as unreclaimable</title>
<updated>2016-07-28T01:00:45Z</updated>
<author>
<name>Nikolay Borisov</name>
</author>
<published>2016-07-25T17:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b1a9a6c54122dade800fd61e90d441e58de19eb'/>
<id>urn:sha1:6b1a9a6c54122dade800fd61e90d441e58de19eb</id>
<content type='text'>
Ceph creates multiple caches with the SLAB_RECLAIMABLE flag set, so
that it can satisfy its internal needs. Inspecting the code shows that
most of the caches are indeed reclaimable since they are directly
related to the generic inode/dentry shrinkers. However, one of the
cache used to satisfy struct file is not reclaimable since its
entries are freed only when the last reference to the file is
dropped. If a heavily loaded node opens a lot of files it can
introduce non-trivial discrepancies between memory shown as reclaimable
and what is actually reclaimed when drop_caches is used.

Fix this by removing the reclaimable flag for the file's cache.

Signed-off-by: Nikolay Borisov &lt;n.borisov.lkml@gmail.com&gt;
Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: mount non-default filesystem by name</title>
<updated>2016-07-28T01:00:40Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-07-08T03:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=430afbadd6c885557ef2fb8c454bd5bba23a9850'/>
<id>urn:sha1:430afbadd6c885557ef2fb8c454bd5bba23a9850</id>
<content type='text'>
To mount non-default filesytem, user currently needs to provide mds
namespace ID. This is inconvenience.

This patch makes user be able to mount filesystem by name. If user
wants to mount non-default filesystem. Client first subscribes to
fsmap.user. Subscribe to mdsmap.&lt;ID&gt; after getting ID of filesystem.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: wait unsafe sync writes for evicting inode</title>
<updated>2016-07-28T00:55:40Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-06-15T08:29:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a5530c63889ac928a45c4645ab0bc23b4fbfcb8'/>
<id>urn:sha1:9a5530c63889ac928a45c4645ab0bc23b4fbfcb8</id>
<content type='text'>
Otherwise ceph_sync_write_unsafe() may access/modify freed inode.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
<entry>
<title>ceph: report mount root in session metadata</title>
<updated>2016-05-25T23:15:33Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2016-04-21T03:09:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f38495409b613071021fca86629df7ae81820ad'/>
<id>urn:sha1:3f38495409b613071021fca86629df7ae81820ad</id>
<content type='text'>
Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
</entry>
</feed>
