From: Xiubo Li via B4 Relay <devnull+xiubo.li.clyso.com@kernel.org>
To: Ilya Dryomov <idryomov@gmail.com>,
Alex Markuze <amarkuze@redhat.com>,
Viacheslav Dubeyko <slava@dubeyko.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiubo Li <xiubo.li@clyso.com>
Subject: [PATCH v7 1/2] ceph: wake up i_cap_wq waiters on inode shutdown
Date: Wed, 02 Sep 2026 23:59:01 -0700 [thread overview]
Message-ID: <20260902-lazyio-v7-1-18c2afa06352@clyso.com> (raw)
In-Reply-To: <20260902-lazyio-v7-0-18c2afa06352@clyso.com>
From: Xiubo Li <xiubo.li@clyso.com>
ceph_inode_shutdown() purges every cap on the inode but never wakes
i_cap_wq, unlike remove_session_caps_cb() which does so after the same
kind of purge. Anyone blocked in ceph_get_caps() is waiting on that
queue for caps that are now gone for good, so the wait only ends when
the task is killed.
Wake the queue after purging so the waiters get a chance to notice the
shutdown and bail out.
Link: https://tracker.ceph.com/issues/77594
Signed-off-by: Xiubo Li <xiubo.li@clyso.com>
---
fs/ceph/inode.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 209e8972287d..619a429f0d45 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -3323,6 +3323,13 @@ void ceph_inode_shutdown(struct inode *inode)
}
spin_unlock(&ci->i_ceph_lock);
+ /*
+ * The caps are gone now, so wake up anyone waiting for them -- they
+ * are never coming back and the waiters need to notice the shutdown
+ * instead. remove_session_caps_cb() does the same after purging.
+ */
+ wake_up_all(&ci->i_cap_wq);
+
if (invalidate)
ceph_queue_invalidate(inode);
while (iputs--)
--
2.53.0
next prev parent reply other threads:[~2026-09-03 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 6:59 [PATCH v7 0/2] ceph: add 'lazyio' mount option to kclient Xiubo Li via B4 Relay
2026-09-03 6:59 ` Xiubo Li via B4 Relay [this message]
2026-09-03 6:59 ` [PATCH v7 2/2] " Xiubo Li via B4 Relay
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=20260902-lazyio-v7-1-18c2afa06352@clyso.com \
--to=devnull+xiubo.li.clyso.com@kernel.org \
--cc=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=xiubo.li@clyso.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
all inboxes | Powered by JetHome®