From 65927f3f8a4a4a37d9aaea30dc05e79b6b856cf2 Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Tue, 30 Sep 2014 18:05:48 -0500 Subject: [PATCH] LU-5691 hsm: remove a request from the index if not present in the store When processing the list of requests that have aged out, if the request cannot be found in the store, removing it from the index. If that is not done, Lustre will try again to remove it, leading to an endless cycle of cancellation. This fixes the repetition of these messages: LustreError: 2028:0:(mdt_coordinator.c:1465:mdt_hsm_update_request_state()) tas01-MDT0000: Cannot find running request for cookie 0x54249515 on fid=[0x200000404:0x15caa:0x0] LustreError: 2028:0:(mdt_coordinator.c:1465:mdt_hsm_update_request_state()) Skipped 15979999 previous similar messages LustreError: 2028:0:(mdt_coordinator.c:339:mdt_coordinator_cb()) tas01-MDT0000: Cannot cleanup timeouted request: [0x200000404:0x15caa:0x0] for cookie 0x54249515 action=CANCEL LustreError: 2028:0:(mdt_coordinator.c:339:mdt_coordinator_cb()) Skipped 15979999 previous similar messages Change-Id: Ie7a2a98be8cc97db9af7a64476c06fc7321544eb Signed-off-by: frank zago Reviewed-on: http://review.whamcloud.com/12142 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_coordinator.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lustre/mdt/mdt_coordinator.c b/lustre/mdt/mdt_coordinator.c index 970d933..ac5518f 100644 --- a/lustre/mdt/mdt_coordinator.c +++ b/lustre/mdt/mdt_coordinator.c @@ -336,6 +336,15 @@ static int mdt_coordinator_cb(const struct lu_env *env, hsm_copytool_action2name( larr->arr_hai.hai_action)); + if (rc == -ENOENT) { + /* The request no longer exists, forget + * about it, and do not send a cancel request + * to the client, for which an error will be + * sent back, leading to an endless cycle of + * cancellation. */ + RETURN(LLOG_DEL_RECORD); + } + /* add the cookie to the list of record to be * canceled by caller */ if (hsd->max_cookie == (hsd->cookie_cnt - 1)) { -- 1.8.3.1