Whamcloud - gitweb
LU-3685 hsm: copy start error should set HP_FLAG_COMPLETED 65/7265/4
authorAurelien Degremont <aurelien.degremont@cea.fr>
Mon, 5 Aug 2013 13:49:16 +0000 (15:49 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Aug 2013 05:27:06 +0000 (05:27 +0000)
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 <aurelien.degremont@cea.fr>
Change-Id: Ie5ddbe8b47331202bd085941c681fcaea57ebf69
Reviewed-on: http://review.whamcloud.com/7265
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

index ace571a..0496b01 100644 (file)
@@ -961,6 +961,9 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy)
+       /* 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);