linux/fs/afs/vl_alias.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* AFS cell alias detection
 *
 * Copyright (C) 2020 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells ([email protected])
 */

#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/namei.h>
#include <keys/rxrpc-type.h>
#include "internal.h"

/*
 * Sample a volume.
 */
static struct afs_volume *afs_sample_volume(struct afs_cell *cell, struct key *key,
					    const char *name, unsigned int namelen)
{}

/*
 * Compare the address lists of a pair of fileservers.
 */
static int afs_compare_fs_alists(const struct afs_server *server_a,
				 const struct afs_server *server_b)
{}

/*
 * Compare the fileserver lists of two volumes.  The server lists are sorted in
 * order of ascending UUID.
 */
static int afs_compare_volume_slists(const struct afs_volume *vol_a,
				     const struct afs_volume *vol_b)
{}

/*
 * Compare root.cell volumes.
 */
static int afs_compare_cell_roots(struct afs_cell *cell)
{}

/*
 * Query the new cell for a volume from a cell we're already using.
 */
static int afs_query_for_alias_one(struct afs_cell *cell, struct key *key,
				   struct afs_cell *p)
{}

/*
 * Query the new cell for volumes we know exist in cells we're already using.
 */
static int afs_query_for_alias(struct afs_cell *cell, struct key *key)
{}

/*
 * Look up a VLDB record for a volume.
 */
static char *afs_vl_get_cell_name(struct afs_cell *cell, struct key *key)
{}

static int yfs_check_canonical_cell_name(struct afs_cell *cell, struct key *key)
{}

static int afs_do_cell_detect_alias(struct afs_cell *cell, struct key *key)
{}

/*
 * Check to see if a new cell is an alias of a cell we already have.  At this
 * point we have the cell's volume server list.
 *
 * Returns 0 if we didn't detect an alias, 1 if we found an alias and an error
 * if we had problems gathering the data required.  In the case the we did
 * detect an alias, cell->alias_of is set to point to the assumed master.
 */
int afs_cell_detect_alias(struct afs_cell *cell, struct key *key)
{}