linux/fs/afs
David Howells 3c4c4075fc afs: Fix the by-UUID server tree to allow servers with the same UUID
Whilst it shouldn't happen, it is possible for multiple fileservers to
share a UUID, particularly if an entire cell has been duplicated, UUIDs and
all.  In such a case, it's not necessarily possible to map the effect of
the CB.InitCallBackState3 incoming RPC to a specific server unambiguously
by UUID and thus to a specific cell.

Indeed, there's a problem whereby multiple server records may need to
occupy the same spot in the rb_tree rooted in the afs_net struct.

Fix this by allowing servers to form a list, with the head of the list in
the tree.  When the front entry in the list is removed, the second in the
list just replaces it.  afs_init_callback_state() then just goes down the
line, poking each server in the list.

This means that some servers will be unnecessarily poked, unfortunately.
An alternative would be to route by call parameters.

Reported-by: Jeffrey Altman <jaltman@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Fixes: d2ddc776a4 ("afs: Overhaul volume and server record caching and fileserver rotation")
2020-06-04 15:37:57 +01:00
..
addr_list.c afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t 2020-03-13 10:47:33 -07:00
afs_cm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_vl.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
afs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
cache.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
callback.c afs: Fix the by-UUID server tree to allow servers with the same UUID 2020-06-04 15:37:57 +01:00
cell.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
cmservice.c afs: Fix handling of CB.ProbeUuid cache manager op 2020-06-04 15:37:57 +01:00
dir_edit.c afs: Remove set but not used variables 'before', 'after' 2019-11-21 20:36:00 +00:00
dir_silly.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
dir.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
dynroot.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
file.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
flock.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
fs_operation.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
fs_probe.c afs: Actively poll fileservers to maintain NAT or firewall openings 2020-05-31 15:19:51 +01:00
fsclient.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
inode.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
internal.h afs: Fix the by-UUID server tree to allow servers with the same UUID 2020-06-04 15:37:57 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
main.c afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
Makefile afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
misc.c AFS development 2019-07-10 20:55:33 -07:00
mntpt.c afs: Fix mountpoint parsing 2019-12-11 16:56:54 +00:00
proc.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
protocol_uae.h afs: Add support for the UAE error table 2019-06-28 18:37:53 +01:00
protocol_yfs.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
rotate.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
rxrpc.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
security.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
server_list.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
server.c afs: Fix the by-UUID server tree to allow servers with the same UUID 2020-06-04 15:37:57 +01:00
super.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
vl_alias.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
vl_list.c fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer() 2019-10-30 08:44:27 -07:00
vl_probe.c rxrpc: Fix the excessive initial retransmission timeout 2020-05-11 16:42:28 +01:00
vl_rotate.c afs: Detect cell aliases 3 - YFS Cells with a canonical cell name op 2020-06-04 15:37:57 +01:00
vlclient.c afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01:00
volume.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00
write.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
xattr.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
xdr_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
yfsclient.c afs: Reorganise volume and server trees to be rooted on the cell 2020-06-04 15:37:57 +01:00