From: Aurelien Degremont Date: Mon, 5 Aug 2013 13:49:16 +0000 (+0200) Subject: LU-3685 hsm: copy start error should set HP_FLAG_COMPLETED X-Git-Tag: 2.4.91~22 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3ef01775bf3a61d9fa5fa9a483b7d7ecc9f9fc92 LU-3685 hsm: copy start error should set HP_FLAG_COMPLETED If an error occurs when initializing a HSM request, in ll_ioc_copy_start(), the PROGRESS message, sent to coordinator, should carry the error code but also HP_FLAG_COMPLETED to mark the request as finished (with error). If not, the Coordinator will ignore this message and consider the request is still running. Signed-off-by: Aurelien Degremont Change-Id: Ie5ddbe8b47331202bd085941c681fcaea57ebf69 Reviewed-on: http://review.whamcloud.com/7265 Tested-by: Hudson Reviewed-by: Jinshan Xiong Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index ace571a..0496b01 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -961,6 +961,9 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy) } progress: + /* On error, the request should be considered as completed */ + if (hpk.hpk_errval > 0) + hpk.hpk_flags |= HP_FLAG_COMPLETED; rc = obd_iocontrol(LL_IOC_HSM_PROGRESS, sbi->ll_md_exp, sizeof(hpk), &hpk, NULL);