Re: [PATCH] ceph: only check the caps of a clean file early after its last close
From: Alex Markuze
Date: Wed Dec 02 2026 - 07:00:34 EST
Hi Xiubo,
If data writeback finishes shortly after the last close, the completion
check can run while the recently used write caps are still wanted. The
new guard has already skipped the idle check. A second client opening
before the wanted interval expires can leave the MDS in MIX beyond the
time the old idle check would have run.
In MIX, a non-lazy MAP_SHARED fault can dirty a folio with Fw but without
Fb. A third client can then complete a write to a different part of the
same folio, and the mapped client's later whole-folio writeback can
overwrite that write. This is possible without this patch too; skipping
the idle check can extend the window.
The CephFS POSIX documentation describes a cache-coherency limitation
when a file is mapped on multiple hosts. Does that limitation also cover
this case, with one mapped host and a separate ordinary writer whose
completed, disjoint write can later be overwritten?
Thanks,
Alex