aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-08-19 15:27:17 +0100
committerDavid Howells <dhowells@redhat.com>2020-08-20 18:21:28 +0100
commitb95b30940ee46a4d892ca3de3ffb8249c4985b1f (patch)
treefcd9268473163fbca8d549a2f78fffa78b4b850e /fs/afs/internal.h
parentafs: Expose information from afs_vlserver through /proc for debugging (diff)
downloadlinux-dev-b95b30940ee46a4d892ca3de3ffb8249c4985b1f.tar.xz
linux-dev-b95b30940ee46a4d892ca3de3ffb8249c4985b1f.zip
afs: Don't use VL probe running state to make decisions outside probe code
Don't use the running state for VL server probes to make decisions about which server to use as the state is cleared at the start of a probe and intermediate values might also be misleading. Instead, add a separate 'latest known' rtt in the afs_vlserver struct and a flag to indicate if the server is known to be responding and update these as and when we know what to change them to. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/afs/internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index b29dfcfe5fc2..18042b7dab6a 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -401,15 +401,17 @@ struct afs_vlserver {
#define AFS_VLSERVER_FL_PROBED 0 /* The VL server has been probed */
#define AFS_VLSERVER_FL_PROBING 1 /* VL server is being probed */
#define AFS_VLSERVER_FL_IS_YFS 2 /* Server is YFS not AFS */
+#define AFS_VLSERVER_FL_RESPONDING 3 /* VL server is responding */
rwlock_t lock; /* Lock on addresses */
atomic_t usage;
+ unsigned int rtt; /* Server's current RTT in uS */
/* Probe state */
wait_queue_head_t probe_wq;
atomic_t probe_outstanding;
spinlock_t probe_lock;
struct {
- unsigned int rtt; /* RTT as ktime/64 */
+ unsigned int rtt; /* RTT in uS */
u32 abort_code;
short error;
unsigned short flags;