Skip to content

Commit 194d28c

Browse files
committed
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>
1 parent 3120c17 commit 194d28c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎fs/afs/internal.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,15 @@ struct afs_cb_interest {
546546
};
547547

548548
/*
549-
* Replaceable server list.
549+
* Replaceable volume server list.
550550
*/
551551
struct afs_server_entry {
552552
struct afs_server *server;
553553
struct afs_cb_interest *cb_interest;
554554
};
555555

556556
struct afs_server_list {
557+
afs_volid_t vids[AFS_MAXTYPES]; /* Volume IDs */
557558
refcount_t usage;
558559
unsigned char nr_servers;
559560
unsigned char preferred; /* Preferred server */

‎fs/afs/server_list.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ struct afs_server_list *afs_alloc_server_list(struct afs_cell *cell,
4646
refcount_set(&slist->usage, 1);
4747
rwlock_init(&slist->lock);
4848

49+
for (i = 0; i < AFS_MAXTYPES; i++)
50+
slist->vids[i] = vldb->vid[i];
51+
4952
/* Make sure a records exists for each server in the list. */
5053
for (i = 0; i < vldb->nr_servers; i++) {
5154
if (!(vldb->fs_mask[i] & type_mask))

0 commit comments

Comments
 (0)