summaryrefslogtreecommitdiff
path: root/fs/afs/vl_list.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-10-30 11:53:16 +0000
committerDavid Howells <dhowells@redhat.com>2024-01-01 16:37:27 +0000
commite6a7d7f71b17e0a44e2155bdad47eae7b5368503 (patch)
tree6279edcf2624cc9abcb55f15b1251828530ec195 /fs/afs/vl_list.c
parent92f091cdddace38e57ad570663b058a38b4d8bed (diff)
afs: Dispatch vlserver probes in priority order
When probing all the addresses for a volume location server, dispatch them in order of descending priority to try and get back highest priority one first. Also add a tracepoint to show the transmission and completion of the probes. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
Diffstat (limited to 'fs/afs/vl_list.c')
-rw-r--r--fs/afs/vl_list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/afs/vl_list.c b/fs/afs/vl_list.c
index 5c4cd71caccf..9b1c20daac53 100644
--- a/fs/afs/vl_list.c
+++ b/fs/afs/vl_list.c
@@ -13,6 +13,7 @@ struct afs_vlserver *afs_alloc_vlserver(const char *name, size_t name_len,
unsigned short port)
{
struct afs_vlserver *vlserver;
+ static atomic_t debug_ids;
vlserver = kzalloc(struct_size(vlserver, name, name_len + 1),
GFP_KERNEL);
@@ -21,6 +22,7 @@ struct afs_vlserver *afs_alloc_vlserver(const char *name, size_t name_len,
rwlock_init(&vlserver->lock);
init_waitqueue_head(&vlserver->probe_wq);
spin_lock_init(&vlserver->probe_lock);
+ vlserver->debug_id = atomic_inc_return(&debug_ids);
vlserver->rtt = UINT_MAX;
vlserver->name_len = name_len;
vlserver->service_id = VL_SERVICE;