aboutsummaryrefslogtreecommitdiffstats
path: root/fs/netfs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2025-07-01 16:38:45 +0000
committerChristian Brauner <[email protected]>2025-07-01 20:37:14 +0000
commit2e0658940d90a3dc130bb3b7f75bae9f4100e01f (patch)
tree05a4c9ce1ec6849705661c3a35ef745cb0f69dda /fs/netfs/internal.h
parentsmb: client: set missing retry flag in cifs_writev_callback() (diff)
downloadkernel-2e0658940d90a3dc130bb3b7f75bae9f4100e01f.tar.gz
kernel-2e0658940d90a3dc130bb3b7f75bae9f4100e01f.zip
netfs: Fix i_size updating
Fix the updating of i_size, particularly in regard to the completion of DIO writes and especially async DIO writes by using a lock. The bug is triggered occasionally by the generic/207 xfstest as it chucks a bunch of AIO DIO writes at the filesystem and then checks that fstat() returns a reasonable st_size as each completes. The problem is that netfs is trying to do "if new_size > inode->i_size, update inode->i_size" sort of thing but without a lock around it. This can be seen with cifs, but shouldn't be seen with kafs because kafs serialises modification ops on the client whereas cifs sends the requests to the server as they're generated and lets the server order them. Fixes: 153a9961b551 ("netfs: Implement unbuffered/DIO write support") Signed-off-by: David Howells <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Paulo Alcantara (Red Hat) <[email protected]> cc: Steve French <[email protected]> cc: Paulo Alcantara <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/netfs/internal.h')
0 files changed, 0 insertions, 0 deletions