On 01/12/2026 10:49, Yuxiang (Kurath) Ji via GNU coreutils Bug Reports wrote:
Hello,
On a FUSE file system with the kernel's write-back cache, Linux 6.16
and later return an error that occurs while the kernel writes a file
out from the call that sets the file's times or permissions (futimens,
fchmod), and the close() that follows returns 0. Up to 6.15 the
close() returned it. virtiofs with virtiofsd's --writeback behaves
the same way.
The change in the kernel is reported to the FUSE maintainers as a
regression, with a patch:
https://lore.kernel.org/all/[email protected]/
mv across file systems treats a failure to set the destination's times
or permissions as a warning, since it does not require them to be
preserved (src/copy.c in 9.12, lines 1050 to 1058, the same on master
at lines 1054 to 1062, and src/mv.c, line 145). On such a file system
the warning is then the only report that the data was not stored, and
mv goes on to remove the source: the only copy of the file is lost and
mv exits 0.
A suggestion: when setting the times, permissions or owner of the
destination fails with EIO, ENOSPC or EDQUOT, treat the copy as failed,
as with require_preserve, and keep the source, since on these file
systems the error can stand for data that was not written. Syncing the
destination before removing the source would catch it as well, at a
cost.
With neither write() or close() identifying the problem,
this is such a fundamental issue, I'm not sure it's worth cp/mv
handling attribute preservation specially here.
What about all the other ways/tools that copy/move data?
Note `cp -a` does indicate the error,
so for a more robust workflow here, perhaps it suffices to use
`cp --preserve=... && rm ...` ?
thanks for the details,
Padraig