Skip to contentSkip to conversation

Revert "ceph: enable async dirops by default"

PATCH In review Venky Shankar 3 participants 5 messages Oct 3, 2023 – Oct 7, 2023 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "ceph: enable async dirops by default"

From: Xiubo Li <[email protected]>

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

---
 fs/ceph/super.c | 4 ++--
 fs/ceph/super.h | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
fs/ceph/super.c +2 -2
index 5ec102f6b1ac..2bf6ccc9887b 100644
@@ -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)
fs/ceph/super.h +1 -2
index 7f4b62182a5d..a5476892896c 100644
@@ -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
Signature · 1 line
2.41.0
maintainer
#1 lore raw
Quoted 22 lines · Venky Shankar

From: Xiubo Li <[email protected]>

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:

Quoted 8 lines
        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).

Hi Venky,

Given that the fix is now up and being reviewed on priority, does it still make sense to change the default?

According to Xiubo, https://tracker.ceph.com/issues/58489 which morphed into https://tracker.ceph.com/issues/61009 isn't the only concern -- he also brought up https://tracker.ceph.com/issues/62810. If the move to revert (change of default) is also prompted by that issue, it should be described in the patch.

Thanks,

Ilya

#2 lore raw

Hi Ilya,

Quoted 35 lines · Ilya Dryomov
Quoted 22 lines · Venky Shankar

From: Xiubo Li <[email protected]>

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:

Quoted 8 lines
        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).

Hi Venky,

Quoted 8 lines

Given that the fix is now up and being reviewed on priority, does it still make sense to change the default?

According to Xiubo, https://tracker.ceph.com/issues/58489 which morphed into https://tracker.ceph.com/issues/61009 isn't the only concern -- he also brought up https://tracker.ceph.com/issues/62810. If the move to revert (change of default) is also prompted by that issue, it should be described in the patch.

Fair enough -- I'll push out with an updated commit message.

Quoted 5 lines

Thanks,

Ilya

Signature · 2 lines
Cheers,
Venky
#3 lore raw

Hi Ilya,

After some digging and talking to Jeff, I figured that it's possible to disable async dirops from the mds side by setting mds_client_delegate_inos_pct config to 0:

- name: mds_client_delegate_inos_pct
type: uint
level: advanced
desc: percentage of preallocated inos to delegate to client
default: 50
services:
- mds

So, I guess this patch is really not required. We can suggest this config update to users and document it for now. We lack tests with this config disabled, so I'll be adding the same before recommending it out. Will keep you posted.

Quoted 60 lines · Venky Shankar

Hi Ilya,

Quoted 35 lines · Ilya Dryomov
Quoted 22 lines · Venky Shankar

From: Xiubo Li <[email protected]>

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:

Quoted 8 lines
        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).

Hi Venky,

Quoted 8 lines

Given that the fix is now up and being reviewed on priority, does it still make sense to change the default?

According to Xiubo, https://tracker.ceph.com/issues/58489 which morphed into https://tracker.ceph.com/issues/61009 isn't the only concern -- he also brought up https://tracker.ceph.com/issues/62810. If the move to revert (change of default) is also prompted by that issue, it should be described in the patch.

Fair enough -- I'll push out with an updated commit message.

Quoted 5 lines

Thanks,

Ilya

--
Cheers,
Venky

Signature · 2 lines
Cheers,
Venky
#4 lore raw
Quoted 14 lines · Venky Shankar

Hi Ilya,

After some digging and talking to Jeff, I figured that it's possible to disable async dirops from the mds side by setting mds_client_delegate_inos_pct config to 0:

- name: mds_client_delegate_inos_pct
type: uint
level: advanced
desc: percentage of preallocated inos to delegate to client
default: 50
services:
- mds

Quoted 4 lines

So, I guess this patch is really not required. We can suggest this config update to users and document it for now. We lack tests with this config disabled, so I'll be adding the same before recommending it out. Will keep you posted.

Venky, Jeff

This option could disable the async create operation but could it also disable the async unlink operation ?

Thanks

- Xiubo

Quoted 56 lines · Venky Shankar
Quoted 53 lines

Hi Ilya,

Quoted 32 lines · Ilya Dryomov
Quoted 21 lines · Venky Shankar

From: Xiubo Li <[email protected]>

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:

Quoted 8 lines
         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).

Hi Venky,

Quoted 8 lines

Given that the fix is now up and being reviewed on priority, does it still make sense to change the default?

According to Xiubo, https://tracker.ceph.com/issues/58489 which morphed into https://tracker.ceph.com/issues/61009 isn't the only concern -- he also brought up https://tracker.ceph.com/issues/62810. If the move to revert (change of default) is also prompted by that issue, it should be described in the patch.

Fair enough -- I'll push out with an updated commit message.

Quoted 4 lines

Thanks,

Ilya

--
Cheers,
Venky