CEPH-Devel archive mirror
 help / color / mirror / Atom feed
From: Venky Shankar <vshankar@redhat.com>
To: ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com, jlayton@kernel.org, mchangir@redhat.com,
	xiubli@redhat.com, Venky Shankar <vshankar@redhat.com>
Subject: [PATCH] Revert "ceph: enable async dirops by default"
Date: Tue,  3 Oct 2023 16:35:56 +0530	[thread overview]
Message-ID: <20231003110556.140317-1-vshankar@redhat.com> (raw)

From: Xiubo Li <xiubli@redhat.com>

This reverts commit f7a67b463fb83a4b9b11ceaa8ec4950b8fb7f902.

We have identified an issue in the MDS affecting CephFS users using
the kernel driver. The issue was first introduced in the octopus
release that added support for clients to perform asynchronous
directory operations using the `nowsync` mount option. The issue
presents itself as an MDS crash resembling (any of) the following
crashes:

        https://tracker.ceph.com/issues/61009
        https://tracker.ceph.com/issues/58489

There is no apparent data loss or corruption, but since the underlying
cause is related to an (operation) ordering issue, the extent of the
problem could surface in other forms - most likely MDS crashes
involving preallocated inodes.

The fix is being reviewed and is being worked on priority:

        https://github.com/ceph/ceph/pull/53752

As a workaround, we recommend (kernel) clients be remounted with the
`wsync` mount option which disables asynchronous directory operations
(depending on the kernel version being used, the default could be
`nowsync`).

This change reverts the default, so, async dirops is disabled (by default).

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
---
 fs/ceph/super.c | 4 ++--
 fs/ceph/super.h | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 5ec102f6b1ac..2bf6ccc9887b 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -742,8 +742,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
 	if (fsopt->flags & CEPH_MOUNT_OPT_CLEANRECOVER)
 		seq_show_option(m, "recover_session", "clean");
 
-	if (!(fsopt->flags & CEPH_MOUNT_OPT_ASYNC_DIROPS))
-		seq_puts(m, ",wsync");
+	if (fsopt->flags & CEPH_MOUNT_OPT_ASYNC_DIROPS)
+		seq_puts(m, ",nowsync");
 	if (fsopt->flags & CEPH_MOUNT_OPT_NOPAGECACHE)
 		seq_puts(m, ",nopagecache");
 	if (fsopt->flags & CEPH_MOUNT_OPT_SPARSEREAD)
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 7f4b62182a5d..a5476892896c 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -47,8 +47,7 @@
 
 #define CEPH_MOUNT_OPT_DEFAULT			\
 	(CEPH_MOUNT_OPT_DCACHE |		\
-	 CEPH_MOUNT_OPT_NOCOPYFROM |		\
-	 CEPH_MOUNT_OPT_ASYNC_DIROPS)
+	 CEPH_MOUNT_OPT_NOCOPYFROM)
 
 #define ceph_set_mount_opt(fsc, opt) \
 	(fsc)->mount_options->flags |= CEPH_MOUNT_OPT_##opt
-- 
2.41.0


             reply	other threads:[~2023-10-03 11:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 11:05 Venky Shankar [this message]
2023-10-03 11:30 ` [PATCH] Revert "ceph: enable async dirops by default" Ilya Dryomov
2023-10-04  4:46   ` Venky Shankar
2023-10-04 13:15     ` Venky Shankar
2023-10-07  1:16       ` Xiubo Li
  -- strict thread matches above, loose matches on Subject: below --
2023-09-27  1:30 xiubli
2023-09-28  9:57 ` Venky Shankar

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=20231003110556.140317-1-vshankar@redhat.com \
    --to=vshankar@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=mchangir@redhat.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).