mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
afs: Retain more of the VLDB record for alias detection
Save more bits from the volume location database record obtained for a server so that we can use this information in cell alias detection. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
3120c170ef
commit
194d28cf19
2 changed files with 5 additions and 1 deletions
|
@ -546,7 +546,7 @@ struct afs_cb_interest {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Replaceable server list.
|
* Replaceable volume server list.
|
||||||
*/
|
*/
|
||||||
struct afs_server_entry {
|
struct afs_server_entry {
|
||||||
struct afs_server *server;
|
struct afs_server *server;
|
||||||
|
@ -554,6 +554,7 @@ struct afs_server_entry {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct afs_server_list {
|
struct afs_server_list {
|
||||||
|
afs_volid_t vids[AFS_MAXTYPES]; /* Volume IDs */
|
||||||
refcount_t usage;
|
refcount_t usage;
|
||||||
unsigned char nr_servers;
|
unsigned char nr_servers;
|
||||||
unsigned char preferred; /* Preferred server */
|
unsigned char preferred; /* Preferred server */
|
||||||
|
|
|
@ -46,6 +46,9 @@ struct afs_server_list *afs_alloc_server_list(struct afs_cell *cell,
|
||||||
refcount_set(&slist->usage, 1);
|
refcount_set(&slist->usage, 1);
|
||||||
rwlock_init(&slist->lock);
|
rwlock_init(&slist->lock);
|
||||||
|
|
||||||
|
for (i = 0; i < AFS_MAXTYPES; i++)
|
||||||
|
slist->vids[i] = vldb->vid[i];
|
||||||
|
|
||||||
/* Make sure a records exists for each server in the list. */
|
/* Make sure a records exists for each server in the list. */
|
||||||
for (i = 0; i < vldb->nr_servers; i++) {
|
for (i = 0; i < vldb->nr_servers; i++) {
|
||||||
if (!(vldb->fs_mask[i] & type_mask))
|
if (!(vldb->fs_mask[i] & type_mask))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue