On Feb 13, 2025, at 4:58 AM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > On Wed, 12 Feb 2025 at 21:01, Daphne Shaw <dshaw@xxxxxxxxxxxxxxx> wrote: > >> Can anyone help explain why one of the 4000-byte writes is being split into a 96-byte and then 3904-byte write? > > Commit 4f06dd92b5d0 ("fuse: fix write deadlock") introduced this > behavior change and has a good description of the problem and the > solution. Here's an excerpt: > > "...serialize the synchronous write with reads from > the partial pages. The easiest way to do this is to keep the partial pages > locked. The problem is that a write() may involve two such pages (one head > and one tail). This patch fixes it by only locking the partial tail page. > If there's a partial head page as well, then split that off as a separate > WRITE request." > > Your example triggered exactly this "two partial pages" case. Ah, we suspected something like this. Thanks for the pointer. > One way out of this is to switch to writeback_cache mode. Would that > work for your case? I will run some tests - it should, as the only access is via fuse so nobody can modify the files behind its back. Even so, you said that was "one way out". What would be another way out of this? Thanks, Daphne