Skip to content

Commit 32275d3

Browse files
committed
afs: Show more a bit more server state in /proc/net/afs/servers
Display more information about the state of a server record, including the flags, rtt and break counter plus the probe state for each server in /proc/net/afs/servers. Rearrange the server flags a bit to make them easier to read at a glance in the proc file. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent f3c130e commit 32275d3

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

fs/afs/internal.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,15 @@ struct afs_server {
497497
time64_t unuse_time; /* Time at which last unused */
498498
unsigned long flags;
499499
#define AFS_SERVER_FL_RESPONDING 0 /* The server is responding */
500-
#define AFS_SERVER_FL_NOT_READY 1 /* The record is not ready for use */
501-
#define AFS_SERVER_FL_NOT_FOUND 2 /* VL server says no such server */
502-
#define AFS_SERVER_FL_VL_FAIL 3 /* Failed to access VL server */
503-
#define AFS_SERVER_FL_UPDATING 4
504-
#define AFS_SERVER_FL_NO_IBULK 7 /* Fileserver doesn't support FS.InlineBulkStatus */
500+
#define AFS_SERVER_FL_UPDATING 1
501+
#define AFS_SERVER_FL_NEEDS_UPDATE 2 /* Fileserver address list is out of date */
502+
#define AFS_SERVER_FL_NOT_READY 4 /* The record is not ready for use */
503+
#define AFS_SERVER_FL_NOT_FOUND 5 /* VL server says no such server */
504+
#define AFS_SERVER_FL_VL_FAIL 6 /* Failed to access VL server */
505505
#define AFS_SERVER_FL_MAY_HAVE_CB 8 /* May have callbacks on this fileserver */
506-
#define AFS_SERVER_FL_IS_YFS 9 /* Server is YFS not AFS */
507-
#define AFS_SERVER_FL_NO_RM2 10 /* Fileserver doesn't support YFS.RemoveFile2 */
508-
#define AFS_SERVER_FL_NEEDS_UPDATE 12 /* Fileserver address list is out of date */
506+
#define AFS_SERVER_FL_IS_YFS 16 /* Server is YFS not AFS */
507+
#define AFS_SERVER_FL_NO_IBULK 17 /* Fileserver doesn't support FS.InlineBulkStatus */
508+
#define AFS_SERVER_FL_NO_RM2 18 /* Fileserver doesn't support YFS.RemoveFile2 */
509509
atomic_t ref; /* Object refcount */
510510
atomic_t active; /* Active user count */
511511
u32 addr_version; /* Address list version */

fs/afs/proc.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,13 @@ static int afs_proc_servers_show(struct seq_file *m, void *v)
386386
&server->uuid,
387387
atomic_read(&server->ref),
388388
atomic_read(&server->active));
389-
seq_printf(m, " - ALIST v=%u osp=%u r=%lx f=%lx\n",
390-
alist->version, atomic_read(&server->probe_outstanding),
391-
alist->responded, alist->failed);
389+
seq_printf(m, " - info: fl=%lx rtt=%u brk=%x\n",
390+
server->flags, server->rtt, server->cb_s_break);
391+
seq_printf(m, " - probe: last=%d out=%d\n",
392+
(int)(jiffies - server->probed_at) / HZ,
393+
atomic_read(&server->probe_outstanding));
394+
seq_printf(m, " - ALIST v=%u rsp=%lx f=%lx\n",
395+
alist->version, alist->responded, alist->failed);
392396
for (i = 0; i < alist->nr_addrs; i++)
393397
seq_printf(m, " [%x] %pISpc%s\n",
394398
i, &alist->addrs[i].transport,

0 commit comments

Comments
 (0)