aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-04-22 00:02:46 +0100
committerDavid Howells <dhowells@redhat.com>2020-06-04 15:37:58 +0100
commit8409f67b6437c4b327ee95a71081b9c7bfee0b00 (patch)
tree79e150c5ad3a0f22f03cebc6dd25fdd9d0473f4f /fs/afs/internal.h
parentafs: Show more a bit more server state in /proc/net/afs/servers (diff)
downloadlinux-dev-8409f67b6437c4b327ee95a71081b9c7bfee0b00.tar.xz
linux-dev-8409f67b6437c4b327ee95a71081b9c7bfee0b00.zip
afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly
Adjust the fileserver rotation algorithm so that if we've tried all the addresses on a server (cumulatively over multiple operations) until we've run out of untried addresses, immediately reprobe all that server's interfaces and retry the op at least once before we move onto the next server. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/afs/internal.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index af0b7fca87db..e1621b0670cc 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -826,16 +826,18 @@ struct afs_operation {
unsigned short nr_iterations; /* Number of server iterations */
unsigned int flags;
-#define AFS_OPERATION_STOP 0x0001 /* Set to cease iteration */
-#define AFS_OPERATION_VBUSY 0x0002 /* Set if seen VBUSY */
-#define AFS_OPERATION_VMOVED 0x0004 /* Set if seen VMOVED */
-#define AFS_OPERATION_VNOVOL 0x0008 /* Set if seen VNOVOL */
-#define AFS_OPERATION_CUR_ONLY 0x0010 /* Set if current server only (file lock held) */
-#define AFS_OPERATION_NO_VSLEEP 0x0020 /* Set to prevent sleep on VBUSY, VOFFLINE, ... */
-#define AFS_OPERATION_UNINTR 0x0040 /* Set if op is uninterruptible */
-#define AFS_OPERATION_DOWNGRADE 0x0080 /* Set to retry with downgraded opcode */
-#define AFS_OPERATION_LOCK_0 0x0100 /* Set if have io_lock on file[0] */
-#define AFS_OPERATION_LOCK_1 0x0200 /* Set if have io_lock on file[1] */
+#define AFS_OPERATION_STOP 0x0001 /* Set to cease iteration */
+#define AFS_OPERATION_VBUSY 0x0002 /* Set if seen VBUSY */
+#define AFS_OPERATION_VMOVED 0x0004 /* Set if seen VMOVED */
+#define AFS_OPERATION_VNOVOL 0x0008 /* Set if seen VNOVOL */
+#define AFS_OPERATION_CUR_ONLY 0x0010 /* Set if current server only (file lock held) */
+#define AFS_OPERATION_NO_VSLEEP 0x0020 /* Set to prevent sleep on VBUSY, VOFFLINE, ... */
+#define AFS_OPERATION_UNINTR 0x0040 /* Set if op is uninterruptible */
+#define AFS_OPERATION_DOWNGRADE 0x0080 /* Set to retry with downgraded opcode */
+#define AFS_OPERATION_LOCK_0 0x0100 /* Set if have io_lock on file[0] */
+#define AFS_OPERATION_LOCK_1 0x0200 /* Set if have io_lock on file[1] */
+#define AFS_OPERATION_TRIED_ALL 0x0400 /* Set if we've tried all the fileservers */
+#define AFS_OPERATION_RETRY_SERVER 0x0800 /* Set if we should retry the current server */
};
/*
@@ -1055,7 +1057,9 @@ static inline void afs_op_set_fid(struct afs_operation *op, unsigned int n,
extern void afs_fileserver_probe_result(struct afs_call *);
extern void afs_fs_probe_fileserver(struct afs_net *, struct afs_server *, struct key *, bool);
extern int afs_wait_for_fs_probes(struct afs_server_list *, unsigned long);
+extern void afs_probe_fileserver(struct afs_net *, struct afs_server *);
extern void afs_fs_probe_dispatcher(struct work_struct *);
+extern int afs_wait_for_one_fs_probe(struct afs_server *, bool);
/*
* inode.c