android_kernel_motorola_sm6375/fs/nfsd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sergey Bashirov 61e8a8c424 NFSD: Fix last write offset handling in layoutcommit
[ Upstream commit d68886bae76a4b9b3484d23e5b7df086f940fa38 ]

The data type of loca_last_write_offset is newoffset4 and is switched
on a boolean value, no_newoffset, that indicates if a previous write
occurred or not. If no_newoffset is FALSE, an offset is not given.
This means that client does not try to update the file size. Thus,
server should not try to calculate new file size and check if it fits
into the segment range. See RFC 8881, section 12.5.4.2.

Sometimes the current incorrect logic may cause clients to hang when
trying to sync an inode. If layoutcommit fails, the client marks the
inode as dirty again.

Fixes: 9cf514ccfa ("nfsd: implement pNFS operations")
Cc: [email protected]
Co-developed-by: Konstantin Evtushenko <[email protected]>
Signed-off-by: Konstantin Evtushenko <[email protected]>
Signed-off-by: Sergey Bashirov <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
[ replaced inode_get_mtime() with inode->i_mtime and removed rqstp parameter from proc_layoutcommit() ]
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2025-10-29 14:00:01 +01:00
..
acl.h
auth.c
auth.h
blocklayout.c NFSD: Fix last write offset handling in layoutcommit 2025-10-29 14:00:01 +01:00
blocklayoutxdr.c NFSD: da_addr_body field missing in some GETDEVICEINFO replies 2023-09-23 10:59:48 +02:00
blocklayoutxdr.h
cache.h
current_stateid.h
export.c nfsd: make sure exp active before svc_export_show 2024-12-14 19:44:44 +01:00
export.h
fault_inject.c
filecache.c
filecache.h
flexfilelayout.c NFSD: Define a proc_layoutcommit for the FlexFiles layout type 2025-10-29 14:00:01 +01:00
flexfilelayoutxdr.c NFSD: da_addr_body field missing in some GETDEVICEINFO replies 2023-09-23 10:59:48 +02:00
flexfilelayoutxdr.h
idmap.h
Kconfig nfs: add missing selections of CONFIG_CRC32 2025-05-02 07:39:20 +02:00
lockd.c nfsd: nfserr_jukebox in nlm_fopen should lead to a retry 2025-10-29 13:59:54 +01:00
Makefile
netns.h
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c NFSD: Fix NFSv3 SETATTR/CREATE's handling of large file sizes 2025-06-27 11:02:49 +01:00
nfs4acl.c
nfs4callback.c NFSD: Reset cb_seq_status after NFS4ERR_DELAY 2025-03-13 12:43:01 +01:00
nfs4idmap.c nfsd: call cache_put if xdr_reserve_space returns NULL 2024-11-08 16:20:32 +01:00
nfs4layouts.c
nfs4proc.c NFSD: Fix last write offset handling in layoutcommit 2025-10-29 14:00:01 +01:00
nfs4recover.c NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir() 2024-12-14 19:44:32 +01:00
nfs4state.c nfsd: handle get_client_locked() failure in nfsd4_setclientid_confirm() 2025-08-28 16:21:34 +02:00
nfs4xdr.c NFSD: Fix NFSv4's PUTPUBFH operation 2024-11-17 14:58:52 +01:00
nfscache.c
nfsctl.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
nfsd.h
nfsfh.c
nfsfh.h nfs: add missing selections of CONFIG_CRC32 2025-05-02 07:39:20 +02:00
nfsproc.c
nfssvc.c
nfsxdr.c
pnfs.h
state.h
stats.c
stats.h
trace.c
trace.h
vfs.c NFSD: Fix ia_size underflow 2025-06-27 11:02:49 +01:00
vfs.h
xdr.h
xdr3.h
xdr4.h
xdr4cb.h