All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: xiubli@redhat.com
Cc: idryomov@gmail.com, ceph-devel@vger.kernel.org
Subject: [PATCH] ceph: wait on async create before checking caps for syncfs
Date: Mon,  6 Jun 2022 19:31:42 -0400	[thread overview]
Message-ID: <20220606233142.150457-1-jlayton@kernel.org> (raw)

Currently, we'll call ceph_check_caps, but if we're still waiting on the
reply, we'll end up spinning around on the same inode in
flush_dirty_session_caps. Wait for the async create reply before
flushing caps.

Fixes: fbed7045f552 (ceph: wait for async create reply before sending any cap messages)
URL: https://tracker.ceph.com/issues/55823
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/caps.c | 1 +
 1 file changed, 1 insertion(+)

I don't know if this will fix the tx queue stalls completely, but I
haven't seen one with this patch in place. I think it makes sense on its
own, either way.

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 0a48bf829671..5ecfff4b37c9 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -4389,6 +4389,7 @@ static void flush_dirty_session_caps(struct ceph_mds_session *s)
 		ihold(inode);
 		dout("flush_dirty_caps %llx.%llx\n", ceph_vinop(inode));
 		spin_unlock(&mdsc->cap_dirty_lock);
+		ceph_wait_on_async_create(inode);
 		ceph_check_caps(ci, CHECK_CAPS_FLUSH, NULL);
 		iput(inode);
 		spin_lock(&mdsc->cap_dirty_lock);
-- 
2.36.1


             reply	other threads:[~2022-06-06 23:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 23:31 Jeff Layton [this message]
2022-06-07  1:11 ` [PATCH] ceph: wait on async create before checking caps for syncfs Xiubo Li
2022-06-07  1:21   ` Jeff Layton
2022-06-07  1:50     ` Xiubo Li
2022-06-08 13:58       ` Jeff Layton
2022-06-09  0:31         ` Xiubo Li
2022-06-09  2:15 ` Yan, Zheng
2022-06-09  3:18   ` Xiubo Li
2022-06-09  3:29     ` Yan, Zheng
2022-06-09  3:55       ` Xiubo Li
2022-06-09  4:02         ` Yan, Zheng
2022-06-09  4:14           ` Xiubo Li
2022-06-09  4:17           ` Xiubo Li
2022-06-09 15:20             ` Yan, Zheng
2022-06-29 12:08   ` Jeff Layton
2022-06-30  2:33     ` Yan, Zheng
2022-06-30  3:32       ` Yan, Zheng

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=20220606233142.150457-1-jlayton@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=xiubli@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.