From c54e61cef76eb0e00c9e69729cf4ac8578c90f47 Mon Sep 17 00:00:00 2001 From: Aurelien Degremont Date: Tue, 24 Sep 2013 15:33:02 +0200 Subject: [PATCH] LU-3999 hsm: Improve mdt.*.hsm.agents output in /proc mdt.*.hsm.agents file contains a list of registered agents and a couple of information for each of them. This patch improves the output to clarify the meaning of each returned values. Signed-off-by: Aurelien Degremont Change-Id: Id4858f7ac9387d539eba03389871c6e99476a5c9 Reviewed-on: http://review.whamcloud.com/7744 Reviewed-by: jacques-Charles Lafoucriere Tested-by: Hudson Tested-by: Maloo Reviewed-by: Faccini Bruno Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_hsm_cdt_agent.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lustre/mdt/mdt_hsm_cdt_agent.c b/lustre/mdt/mdt_hsm_cdt_agent.c index 122f07b..9a9ce6d 100644 --- a/lustre/mdt/mdt_hsm_cdt_agent.c +++ b/lustre/mdt/mdt_hsm_cdt_agent.c @@ -576,15 +576,16 @@ static int mdt_hsm_agent_proc_show(struct seq_file *s, void *v) RETURN(0); ha = list_entry(pos, struct hsm_agent, ha_list); - seq_printf(s, "uuid=%s archive#=%d (", ha->ha_uuid.uuid, - ha->ha_archive_cnt); - if (ha->ha_archive_cnt == 0) - seq_printf(s, "all"); - else - for (i = 0; i < ha->ha_archive_cnt; i++) - seq_printf(s, "%d ", ha->ha_archive_id[i]); + seq_printf(s, "uuid=%s archive_id=", ha->ha_uuid.uuid); + if (ha->ha_archive_cnt == 0) { + seq_printf(s, "ANY"); + } else { + seq_printf(s, "%d", ha->ha_archive_id[0]); + for (i = 1; i < ha->ha_archive_cnt; i++) + seq_printf(s, ",%d", ha->ha_archive_id[i]); + } - seq_printf(s, ") r=%d s=%d f=%d\n", + seq_printf(s, " requests=[current:%d ok:%d errors:%d]\n", atomic_read(&ha->ha_requests), atomic_read(&ha->ha_success), atomic_read(&ha->ha_failure)); -- 1.8.3.1