Re: [PATCH 0/2] ceph: serialize O_APPEND writes across clients
From: Xiubo Li
Date: Thu Nov 26 2026 - 01:46:13 EST
Hi Alex,
Good catch, thanks. I reproduced it with two active MDSs, one of them
hiding CEPHFS_FEATURE_APPEND_EXCL: once the directory was exported to
it, the waiting append never got Fx and the writers hung.
In v2 the waiter rechecks the auth session on every wakeup: if the
auth cap is on an open session that does not have APPEND_EXCL,
try_get_cap_refs() fails with -EOPNOTSUPP and ceph_write_iter()
retries with the existing Fw-only path, and ceph_append_kick() stops
asking that MDS for a turn. With that the writes go on after the
export, with the same behaviour as with an older MDS.
Thanks,
Xiubo
On Sun, 22 Nov 2026 at 19:25, Alex Markuze <amarkuze@xxxxxxxxxx> wrote:
>
> Hi Xiubo,
>
> The feature check happens once before ceph_get_append_caps(). If an
> append starts waiting on an MDS that supports APPEND_EXCL and the auth
> cap migrates to an MDS without that feature, ceph_append_kick() keeps
> asking for Fx. With another writer active, the older MDS can stay in MIX
> and grant Fw without Fx, so the append keeps waiting while holding
> i_rwsem.
>
> Could the waiter recheck the current auth session's features and fall
> back to the existing Fw-only path once an open session is known not to
> support APPEND_EXCL? That would preserve the existing older-MDS behavior
> instead of leaving the write waiting after migration.
>
> Thanks,
> Alex
>