Whamcloud - gitweb
LU-3685 hsm: copy start error should set HP_FLAG_COMPLETED
[fs/lustre-release.git] / lustre / llite / dir.c
index ace571a..0496b01 100644 (file)
@@ -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);