deepin-kernel/fs/nfs
Trond Myklebust 64bc605c55 NFSv4/flexfiles: Fix handling of NFS level errors in I/O
[ Upstream commit 38074de35b015df5623f524d6f2b49a0cd395c40 ]

Allow the flexfiles error handling to recognise NFS level errors (as
opposed to RPC level errors) and handle them separately. The main
motivator is the NFSERR_PERM errors that get returned if the NFS client
connects to the data server through a port number that is lower than
1024. In that case, the client should disconnect and retry a READ on a
different data server, or it should retry a WRITE after reconnecting.

Reviewed-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Fixes: d67ae825a5 ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 204bdc7a8b7b7b7fcfc500f1402762a1f99e00bc)
2025-07-14 10:42:17 +08:00
..
blocklayout pNFS: Fix the pnfs block driver's calculation of layoutget size 2024-01-25 15:35:18 -08:00
filelayout nfs: don't share pNFS DS connections between net namespaces 2025-06-10 16:18:08 +08:00
flexfilelayout NFSv4/flexfiles: Fix handling of NFS level errors in I/O 2025-07-14 10:42:17 +08:00
Kconfig nfs: add missing selections of CONFIG_CRC32 2025-05-09 22:54:46 +08:00
Makefile
cache_lib.c
cache_lib.h
callback.c nfsd: stop setting ->pg_stats for unused stats 2024-12-10 20:40:33 +08:00
callback.h
callback_proc.c nfs: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
callback_xdr.c SUNRPC: Fix integer overflow in decode_rc_list() 2024-12-10 20:42:45 +08:00
client.c NFS: Avoid flushing data while holding directory locks in nfs_rename() 2025-06-10 16:18:09 +08:00
delegation.c NFSv4: Check for delegation validity in nfs_start_delegation_return_locked() 2025-06-10 10:34:50 +08:00
delegation.h
dir.c NFS: Avoid flushing data while holding directory locks in nfs_rename() 2025-06-10 16:18:09 +08:00
direct.c NFS: O_DIRECT writes must check and adjust the file length 2025-03-18 15:20:51 +08:00
dns_resolve.c NFS: Move common includes outside ifdef 2023-08-24 13:24:15 -04:00
dns_resolve.h
export.c nfsd: allow reaping files still under writeback 2023-04-26 09:04:59 -04:00
file.c NFS: fix nfs_release_folio() to not deadlock via kcompactd writeback 2025-03-18 15:20:51 +08:00
fs_context.c nfs: keep server info for remounts 2024-12-10 20:26:18 +08:00
fscache.c NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt 2024-03-26 18:20:03 -04:00
fscache.h nfs: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
getroot.c
inode.c nfs: Clean up /proc/net/rpc/nfs when nfs_fs_proc_net_init() fails. 2025-07-14 10:42:11 +08:00
internal.h NFS: Don't allow waiting for exiting tasks 2025-06-10 10:34:50 +08:00
io.c
iostat.h NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API 2023-04-11 13:08:26 -04:00
mount_clnt.c
namespace.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
netns.h nfs: make the rpc_stat per net namespace 2024-12-10 20:19:39 +08:00
nfs.h
nfs2super.c
nfs2xdr.c NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN 2023-08-30 11:08:27 -04:00
nfs3_fs.h
nfs3acl.c Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
nfs3client.c NFS/pNFS: Set the connect timeout for the pNFS flexfiles driver 2023-08-24 13:24:15 -04:00
nfs3proc.c NFS: Don't allow waiting for exiting tasks 2025-06-10 10:34:50 +08:00
nfs3super.c
nfs3xdr.c NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN 2023-08-30 11:08:27 -04:00
nfs4_fs.h fs: Pass argument to fcntl_setlease as int 2023-07-10 14:36:11 +02:00
nfs4client.c NFSv4.1 another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server 2024-12-10 20:39:50 +08:00
nfs4file.c fs: Pass argument to fcntl_setlease as int 2023-07-10 14:36:11 +02:00
nfs4getroot.c
nfs4idmap.c HAOC: Add support for x86 CRED Protection (CREDP). 2025-05-12 15:02:47 +08:00
nfs4idmap.h
nfs4namespace.c
nfs4proc.c NFSv4: xattr handlers should check for absent nfs filehandles 2025-07-09 09:49:55 +08:00
nfs4renewd.c
nfs4session.c
nfs4session.h nfs: add missing selections of CONFIG_CRC32 2025-05-09 22:54:46 +08:00
nfs4state.c NFSv4: Treat ENETUNREACH errors as fatal for state recovery 2025-06-10 10:34:51 +08:00
nfs4super.c
nfs4sysctl.c nfs: simplify two-level sysctl registration for nfs4_cb_sysctls 2023-04-13 11:49:35 -07:00
nfs4trace.c
nfs4trace.h
nfs4xdr.c
nfs42.h NFSv4.2: fix listxattr maximum XDR buffer size 2024-03-26 18:20:02 -04:00
nfs42proc.c NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE 2025-02-10 01:59:56 +08:00
nfs42xattr.c NFSv4.2: fix wrong shrinker_id 2023-06-19 15:10:45 -04:00
nfs42xdr.c NFSv4.2: fix COPY_NOTIFY xdr buf size calculation 2025-02-10 01:59:56 +08:00
nfsroot.c NFS: Fix an off by one in root_nfs_cat() 2024-03-26 18:20:03 -04:00
nfstrace.c
nfstrace.h NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit 2023-04-11 13:08:27 -04:00
pagelist.c nfs: Avoid flushing many pages with NFS_FILE_SYNC 2024-12-10 20:39:28 +08:00
pnfs.c NFSv4/pNFS: Fix a race to wake on NFS_LAYOUT_DRAIN 2025-07-14 10:42:11 +08:00
pnfs.h nfs: don't share pNFS DS connections between net namespaces 2025-06-10 16:18:08 +08:00
pnfs_dev.c NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info 2023-08-24 13:24:15 -04:00
pnfs_nfs.c nfs: don't share pNFS DS connections between net namespaces 2025-06-10 16:18:08 +08:00
proc.c
read.c fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio() 2025-07-03 11:31:51 +08:00
super.c nfs: ignore SB_RDONLY when remounting nfs 2025-06-20 14:39:57 +08:00
symlink.c nfs: propagate readlink errors in nfs_symlink_filler 2024-12-10 20:39:28 +08:00
sysctl.c nfs: simplify two-level sysctl registration for nfs_cb_sysctls 2023-04-13 11:49:35 -07:00
sysfs.c NFS: Shut down the nfs_client only after all the superblocks 2025-04-14 15:49:27 +08:00
sysfs.h NFS: Add sysfs links to sunrpc clients for nfs_clients 2023-06-19 15:04:13 -04:00
unlink.c
write.c nfs: fix UAF in direct writes 2024-04-03 15:28:29 +02:00