linux/fs/fuse
Amir Goldstein 20121d3f58 fuse: update inode size after extending passthrough write
yangyun reported that libfuse test test_copy_file_range() copies zero
bytes from a newly written file when fuse passthrough is enabled.

The reason is that extending passthrough write is not updating the fuse
inode size and when vfs_copy_file_range() observes a zero size inode,
it returns without calling the filesystem copy_file_range() method.

Fix this by adjusting the fuse inode size after an extending passthrough
write.

This does not provide cache coherency of fuse inode attributes and
backing inode attributes, but it should prevent situations where fuse
inode size is too small, causing read/copy to be wrongly shortened.

Reported-by: yangyun <yangyun50@huawei.com>
Closes: https://github.com/libfuse/libfuse/issues/1048
Fixes: 57e1176e60 ("fuse: implement read/write passthrough")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2024-10-16 13:18:21 +02:00
..
acl.c fuse: support idmapped ->set_acl 2024-09-04 16:51:11 +02:00
control.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
cuse.c cuse: add kernel-doc comments to cuse_process_init_reply() 2024-04-15 11:02:10 +02:00
dax.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
dev.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
dir.c fs/fuse: convert to use invalid_mnt_idmap 2024-09-23 11:10:26 +02:00
file.c fuse update for 6.12 2024-09-24 15:29:42 -07:00
fuse_i.h fs/fuse: convert to use invalid_mnt_idmap 2024-09-23 11:10:26 +02:00
fuse_trace.h fuse: add simple request tracepoints 2024-08-29 11:43:13 +02:00
inode.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
ioctl.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
iomode.c fuse: fix parallel dio write on file open in passthrough mode 2024-04-15 10:12:44 +02:00
Kconfig fuse: introduce FUSE_PASSTHROUGH capability 2024-02-23 17:36:32 +01:00
Makefile fuse: add simple request tracepoints 2024-08-29 11:43:13 +02:00
passthrough.c fuse: update inode size after extending passthrough write 2024-10-16 13:18:21 +02:00
readdir.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00
virtio_fs.c virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
xattr.c fs/fuse: introduce and use fuse_simple_idmap_request() helper 2024-09-23 11:07:55 +02:00