ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: xiubli@redhat.com
To: jlayton@kernel.org, idryomov@gmail.com
Cc: pdonnell@redhat.com, ceph-devel@vger.kernel.org,
	Xiubo Li <xiubli@redhat.com>
Subject: [PATCH v2 0/4] flush the mdlog before waiting on unsafe reqs
Date: Mon,  5 Jul 2021 09:22:53 +0800	[thread overview]
Message-ID: <20210705012257.182669-1-xiubli@redhat.com> (raw)

From: Xiubo Li <xiubli@redhat.com>

For the client requests who will have unsafe and safe replies from
MDS daemons, in the MDS side the MDS daemons won't flush the mdlog
(journal log) immediatelly, because they think it's unnecessary.
That's true for most cases but not all, likes the fsync request.
The fsync will wait until all the unsafe replied requests to be
safely replied.

Normally if there have multiple threads or clients are running, the
whole mdlog in MDS daemons could be flushed in time if any request
will trigger the mdlog submit thread. So usually we won't experience
the normal operations will stuck for a long time. But in case there
has only one client with only thread is running, the stuck phenomenon
maybe obvious and the worst case it must wait at most 5 seconds to
wait the mdlog to be flushed by the MDS's tick thread periodically.

This patch will trigger to flush the mdlog in all the relevant and
auth MDSes manually just before waiting the unsafe requests to finish.


Changed in V2:
- send mdlog flush request to unsafe req relevant and auth MDSes only
instead of all of them.
- rename the first two commits' subject.
- fix the log messages.
- remove the feature bits fixing patch.
- fix some comments.
- remove flush_mdlog() wrapper.
- update the ceph_session_op_name() for new _REQUEST_FLUSH_MDLOG.



Xiubo Li (4):
  ceph: make ceph_create_session_msg a global symbol
  ceph: make iterate_sessions a global symbol
  ceph: flush mdlog before umounting
  ceph: flush the mdlog before waiting on unsafe reqs

 fs/ceph/caps.c               | 104 ++++++++++++++++++++++++++---------
 fs/ceph/mds_client.c         |  90 ++++++++++++++++++++++--------
 fs/ceph/mds_client.h         |   5 ++
 fs/ceph/strings.c            |   1 +
 include/linux/ceph/ceph_fs.h |   1 +
 5 files changed, 152 insertions(+), 49 deletions(-)

-- 
2.27.0


             reply	other threads:[~2021-07-05  1:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05  1:22 xiubli [this message]
2021-07-05  1:22 ` [PATCH v2 1/4] ceph: make ceph_create_session_msg a global symbol xiubli
2021-07-05  1:22 ` [PATCH v2 2/4] ceph: make iterate_sessions " xiubli
2021-07-05  1:22 ` [PATCH v2 3/4] ceph: flush mdlog before umounting xiubli
2021-07-05  1:22 ` [PATCH v2 4/4] ceph: flush the mdlog before waiting on unsafe reqs xiubli
2021-07-06 11:42   ` Jeff Layton
2021-07-06 12:37     ` Xiubo Li
2021-07-06 13:11       ` Jeff Layton
2021-07-06 13:17         ` Xiubo Li

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=20210705012257.182669-1-xiubli@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=pdonnell@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).