From: Frank Zago Date: Tue, 30 Sep 2014 23:05:48 +0000 (-0500) Subject: LU-5691 hsm: remove a request from the index if not present in the store X-Git-Tag: 2.6.90~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=65927f3f8a4a4a37d9aaea30dc05e79b6b856cf2;p=fs%2Flustre-release.git 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 --- 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)) {