original_kernel/fs/9p
David Howells 252cf7b2ea 9p: Use length of data written to the server in preference to error
In v9fs_upload_to_server(), we pass the error to netfslib to terminate the
subreq rather than the amount of data written - even if we did actually
write something.

Further, we assume that the write is always entirely done if successful -
but it might have been partially complete - as returned by
p9_client_write(), but we ignore that.

Fix this by indicating the amount written by preference and only returning
the error if we didn't write anything.

(We might want to return both in future if both are available as this
might be useful as to whether we retry or not.)

Suggested-by: Dominique Martinet <asmadeus@codewreck.org>
Link: https://lore.kernel.org/r/ZZULNQAZ0n0WQv7p@codewreck.org/
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dominique Martinet <asmadeus@codewreck.org>
cc: Eric Van Hensbergen <ericvh@kernel.org>
cc: Latchesar Ionkov <lucho@ionkov.net>
cc: Christian Schoenebeck <linux_oss@crudebyte.com>
cc: v9fs@lists.linux.dev
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
2024-01-04 13:15:31 +00:00
..
Kconfig
Makefile
acl.c
acl.h
cache.c mm, netfs, fscache: stop read optimisation when folio removed from pagecache 2023-08-18 10:12:13 -07:00
cache.h
fid.c
fid.h fs/9p: fix type mismatch in file cache mode helper 2023-07-20 16:15:15 +00:00
v9fs.c 9p/fs: add MODULE_DESCIPTION 2023-10-27 12:44:13 +09:00
v9fs.h fs/9p: Fix a datatype used with V9FS_DIRECT_IO 2023-07-10 13:04:37 +00:00
v9fs_vfs.h 9p: Fix initialisation of netfs_inode for 9p 2024-01-03 14:53:01 +00:00
vfs_addr.c 9p: Use length of data written to the server in preference to error 2024-01-04 13:15:31 +00:00
vfs_dentry.c
vfs_dir.c 9p: fix ignored return value in v9fs_dir_release 2023-07-20 19:05:52 +00:00
vfs_file.c 9p: Use netfslib read/write_iter 2023-12-28 09:45:28 +00:00
vfs_inode.c 9p: Fix initialisation of netfs_inode for 9p 2024-01-03 14:53:01 +00:00
vfs_inode_dotl.c 9p: Fix initialisation of netfs_inode for 9p 2024-01-03 14:53:01 +00:00
vfs_super.c netfs: Move pinning-for-writeback from fscache to netfs 2023-12-24 15:08:49 +00:00
xattr.c Bunch of small fixes: 2023-11-04 09:20:04 -10:00
xattr.h 9p: move xattr-related structs to .rodata 2023-10-09 16:24:16 +02:00