Re: [PATCH] coda: honor the append state of each write

From: Hungyu Lin

Date: Thu Nov 05 2026 - 00:19:50 EST


> Why do we now have cached copies of f_flags around? That sounds like a
> recipe for getting things out of sync.

f_iocb_flags was introduced by 164f4064ca81. The VFS initializes it at
open and updates it during F_SETFL, but Coda's direct modification of
the container's f_flags misses that update.

> Anyway, your patch subtly changes the container file we write from
> cfi->cfi_container to host_file and I am not convinced that is a safe
> change.

That substitution was unnecessary for the append fix. V2 keeps
cfi->cfi_container in the write call and leaves the existing i_size
copyback unchanged.

I traced the container reference from coda_open() to coda_release()
and could not find a path that replaces it after open. ACCESS_INTENT
does not return a replacement handle. The container's contents and
size may change during the upcall, but the existing size copyback
reads i_size through the same held file reference after
vfs_iter_write() returns.

Thanks,
Hungyu