<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ceph/caps.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-05-22T09:43:49Z</updated>
<entry>
<title>ceph: fix fscache invalidation</title>
<updated>2021-05-22T09:43:49Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2021-01-21T23:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c63f9317aef56f2b6f4e104bdc18bf50fb7b200'/>
<id>urn:sha1:3c63f9317aef56f2b6f4e104bdc18bf50fb7b200</id>
<content type='text'>
[ Upstream commit 10a7052c7868bc7bc72d947f5aac6f768928db87 ]

Ensure that we invalidate the fscache whenever we invalidate the
pagecache.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ceph: defer flushing the capsnap if the Fb is used</title>
<updated>2021-02-16T11:09:52Z</updated>
<author>
<name>Xiubo Li</name>
</author>
<published>2021-02-02T06:54:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=558b4510f622a3d96cf9d95050a04e7793d343c7'/>
<id>urn:sha1:558b4510f622a3d96cf9d95050a04e7793d343c7</id>
<content type='text'>
If the Fb cap is used it means the current inode is flushing the
dirty data to OSD, just defer flushing the capsnap.

URL: https://tracker.ceph.com/issues/48640
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;
</content>
</entry>
<entry>
<title>ceph: allow queueing cap/snap handling after putting cap references</title>
<updated>2021-02-16T11:09:51Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-12-10T19:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8810cdc007f816e0e2448879ebd84152ce8c907'/>
<id>urn:sha1:a8810cdc007f816e0e2448879ebd84152ce8c907</id>
<content type='text'>
Testing with the fscache overhaul has triggered some lockdep warnings
about circular lock dependencies involving page_mkwrite and the
mmap_lock. It'd be better to do the "real work" without the mmap lock
being held.

Change the skip_checking_caps parameter in __ceph_put_cap_refs to an
enum, and use that to determine whether to queue check_caps, do it
synchronously or not at all. Change ceph_page_mkwrite to do a
ceph_put_cap_refs_async().

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: fix flush_snap logic after putting caps</title>
<updated>2021-02-16T11:09:51Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-12-10T18:35:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64f36da5625f7f9853b86750eaa89d499d16a2e9'/>
<id>urn:sha1:64f36da5625f7f9853b86750eaa89d499d16a2e9</id>
<content type='text'>
A primary reason for skipping ceph_check_caps after putting the
references was to avoid the locking in ceph_check_caps during a
reconnect. __ceph_put_cap_refs can still call ceph_flush_snaps in that
case though, and that takes many of the same inconvenient locks.

Fix the logic in __ceph_put_cap_refs to skip flushing snaps when the
skip_checking_caps flag is set.

Fixes: e64f44a88465 ("ceph: skip checking caps when session reconnecting and releasing reqs")
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: fix race in concurrent __ceph_remove_cap invocations</title>
<updated>2020-12-14T22:21:47Z</updated>
<author>
<name>Luis Henriques</name>
</author>
<published>2020-11-12T10:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5cafce3ad0f8652d6849314d951459c2bff7233'/>
<id>urn:sha1:e5cafce3ad0f8652d6849314d951459c2bff7233</id>
<content type='text'>
A NULL pointer dereference may occur in __ceph_remove_cap with some of the
callbacks used in ceph_iterate_session_caps, namely trim_caps_cb and
remove_session_caps_cb. Those callers hold the session-&gt;s_mutex, so they
are prevented from concurrent execution, but ceph_evict_inode does not.

Since the callers of this function hold the i_ceph_lock, the fix is simply
a matter of returning immediately if caps-&gt;ci is NULL.

Cc: stable@vger.kernel.org
URL: https://tracker.ceph.com/issues/43272
Suggested-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Luis Henriques &lt;lhenriques@suse.de&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: fix up some warnings on W=1 builds</title>
<updated>2020-12-14T22:21:47Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-09-29T23:32:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06a1ad438b7b8d4fd689114a305b37cb526ff638'/>
<id>urn:sha1:06a1ad438b7b8d4fd689114a305b37cb526ff638</id>
<content type='text'>
Convert some decodes into unused variables into skips, and fix up some
non-kerneldoc comment headers to not start with "/**".

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: add new RECOVER mount_state when recovering session</title>
<updated>2020-12-14T22:21:46Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-09-25T11:55:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50c9132ddfb2024e96900407beeec660cf9848bd'/>
<id>urn:sha1:50c9132ddfb2024e96900407beeec660cf9848bd</id>
<content type='text'>
When recovering a session (a'la recover_session=clean), we want to do
all of the operations that we do on a forced umount, but changing the
mount state to SHUTDOWN is can cause queued MDS requests to fail when
the session comes back. Most of those can idle until the session is
recovered in this situation.

Reserve SHUTDOWN state for forced umount, and make a new RECOVER state
for the forced reconnect situation. Change several tests for equality with
SHUTDOWN to test for that or RECOVER.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Reviewed-by: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: don't WARN when removing caps due to blocklisting</title>
<updated>2020-12-14T22:21:46Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-09-25T13:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc167e38a014e04e4484b969ee05765232249b0d'/>
<id>urn:sha1:dc167e38a014e04e4484b969ee05765232249b0d</id>
<content type='text'>
We expect to remove dirty caps when the client is blocklisted. Don't
throw a warning in that case.

[ idryomov: break unnecessarily long line ]

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Reviewed-by: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: check session state after bumping session-&gt;s_seq</title>
<updated>2020-11-04T19:55:49Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-10-12T13:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62575e270f661aba64778cbc5f354511cf9abb21'/>
<id>urn:sha1:62575e270f661aba64778cbc5f354511cf9abb21</id>
<content type='text'>
Some messages sent by the MDS entail a session sequence number
increment, and the MDS will drop certain types of requests on the floor
when the sequence numbers don't match.

In particular, a REQUEST_CLOSE message can cross with one of the
sequence morphing messages from the MDS which can cause the client to
stall, waiting for a response that will never come.

Originally, this meant an up to 5s delay before the recurring workqueue
job kicked in and resent the request, but a recent change made it so
that the client would never resend, causing a 60s stall unmounting and
sometimes a blockisting event.

Add a new helper for incrementing the session sequence and then testing
to see whether a REQUEST_CLOSE needs to be resent, and move the handling
of CEPH_MDS_SESSION_CLOSING into that function. Change all of the
bare sequence counter increments to use the new helper.

Reorganize check_session_state with a switch statement.  It should no
longer be called when the session is CLOSING, so throw a warning if it
ever is (but still handle that case sanely).

[ idryomov: whitespace, pr_err() call fixup ]

URL: https://tracker.ceph.com/issues/47563
Fixes: fa9967734227 ("ceph: fix potential mdsc use-after-free crash")
Reported-by: Patrick Donnelly &lt;pdonnell@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>ceph: comment cleanups and clarifications</title>
<updated>2020-10-12T13:29:27Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2020-10-06T16:24:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c74d79af9002a9cb179f7950a2c266f0de964abe'/>
<id>urn:sha1:c74d79af9002a9cb179f7950a2c266f0de964abe</id>
<content type='text'>
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
</feed>
