From 1ce2c6f33c104cafbf42828551e338d0c5e7602a Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Fri, 19 Feb 2016 13:09:55 -0600 Subject: [PATCH] LU-7799 hsm: use correct record start index for actions In mdt_hsm_actions_proc_show() pass index of the last printed record to the startidx of llog_cat_process(). This avoids an issue where the next record to be printed would have been skipped. Signed-off-by: John L. Hammond Change-Id: Ic8516d6a9429a21bf1f8d435d60bc9e8801982a5 Reviewed-on: http://review.whamcloud.com/18525 Tested-by: Jenkins Reviewed-by: Mike Pershin Tested-by: Maloo Reviewed-by: Henri Doreau Reviewed-by: jacques-Charles Lafoucriere Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_hsm_cdt_actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/mdt/mdt_hsm_cdt_actions.c b/lustre/mdt/mdt_hsm_cdt_actions.c index 59cbfe2..9d61d53 100644 --- a/lustre/mdt/mdt_hsm_cdt_actions.c +++ b/lustre/mdt/mdt_hsm_cdt_actions.c @@ -370,7 +370,7 @@ static void *mdt_hsm_actions_proc_start(struct seq_file *s, loff_t *pos) /* first call = rewind */ if (*pos == 0) { aai->aai_cat_index = 0; - aai->aai_index = -1; + aai->aai_index = 0; aai->aai_eof = false; *pos = 1; } @@ -471,7 +471,7 @@ static int mdt_hsm_actions_proc_show(struct seq_file *s, void *v) mutex_lock(&cdt->cdt_llog_lock); rc = llog_cat_process(&aai->aai_env, aai->aai_ctxt->loc_handle, hsm_actions_show_cb, s, - aai->aai_cat_index, aai->aai_index + 1); + aai->aai_cat_index, aai->aai_index); mutex_unlock(&cdt->cdt_llog_lock); if (rc == 0) /* all llog parsed */ aai->aai_eof = true; -- 1.8.3.1