linux-IllusionX/fs/afs
David Howells 8a070a9648 afs: Detect cell aliases 1 - Cells with root volumes
Put in the first phase of cell alias detection.  This part handles alias
detection for cells that have root.cell volumes (which is expected to be
likely).

When a cell becomes newly active, it is probed for its root.cell volume,
and if it has one, this volume is compared against other root.cell volumes
to find out if the list of fileserver UUIDs have any in common - and if
that's the case, do the address lists of those fileservers have any
addresses in common.  If they do, the new cell is adjudged to be an alias
of the old cell and the old cell is used instead.

Comparing is aided by the server list in struct afs_server_list being
sorted in UUID order and the addresses in the fileserver address lists
being sorted in address order.

The cell then retains the afs_volume object for the root.cell volume, even
if it's not mounted for future alias checking.

This necessary because:

 (1) Whilst fileservers have UUIDs that are meant to be globally unique, in
     practice they are not because cells get cloned without changing the
     UUIDs - so afs_server records need to be per cell.

 (2) Sometimes the DNS is used to make cell aliases - but if we don't know
     they're the same, we may end up with multiple superblocks and multiple
     afs_server records for the same thing, impairing our ability to
     deliver callback notifications of third party changes

 (3) The fileserver RPC API doesn't contain the cell name, so it can't tell
     us which cell it's notifying and can't see that a change made to to
     one cell should notify the same client that's also accessed as the
     other cell.

Reported-by: Jeffrey Altman <jaltman@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
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.h afs: Implement client support for the YFSVL.GetCellName RPC op 2020-06-04 15:37:57 +01: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
cache.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
callback.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
cell.c afs: Detect cell aliases 1 - Cells with root volumes 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.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +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
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: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +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: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
inode.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
internal.h afs: Detect cell aliases 1 - Cells with root volumes 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: Detect cell aliases 1 - Cells with root volumes 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: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
rxrpc.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
security.c afs: Support RCU pathwalk 2019-09-02 11:43:54 +01:00
server.c afs: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00
server_list.c afs: Retain more of the VLDB record for alias detection 2020-06-04 15:37:57 +01:00
super.c afs: Detect cell aliases 1 - Cells with root volumes 2020-06-04 15:37:57 +01:00
vl_alias.c afs: Detect cell aliases 1 - Cells with root volumes 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: Remove some unused bits 2020-04-24 16:32:49 +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: Detect cell aliases 1 - Cells with root volumes 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: Build an abstraction around an "operation" concept 2020-06-04 15:37:17 +01:00