Skip to content

flush the mdlog before waiting on unsafe reqs

[email protected] ceph-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v15 patches 29 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ceph: make ceph_create_session_msg a global symbolfs/ceph/mds_client.c fs/ceph/mds_client.h+10 -70 replies
2/4ceph: make iterate_sessions a global symbolfs/ceph/caps.c fs/ceph/mds_client.c fs/ceph/mds_client.h+36 -420 replies
3/4ceph: flush mdlog before umountingfs/ceph/mds_client.c fs/ceph/mds_client.h fs/ceph/strings.c +1 more+28 -00 replies
4/4ceph: flush the mdlog before waiting on unsafe reqsfs/ceph/caps.c+78 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] flush the mdlog before waiting on unsafe reqs

From: Xiubo Li <[email protected]>

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(-)
Signature · 1 line
2.27.0