In llapi_hsm_action_begin(), if the action is a remove then skip
calling the LL_IOC_HSM_COPY_START ioctl.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id84f1877a4f05c91e063797b51bd2046f2283ec4
Reviewed-on: https://review.whamcloud.com/23700
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
goto err_out;
}
+ /* Since remove is atomic there is no need to send an initial
+ * MDS_HSM_PROGRESS RPC. */
+ if (hai->hai_action == HSMA_REMOVE)
+ goto out_log;
+
rc = ioctl(ct->mnt_fd, LL_IOC_HSM_COPY_START, &hcp->copy);
if (rc < 0) {
rc = -errno;
goto err_out;
}
+out_log:
llapi_hsm_log_ct_progress(&hcp, hai, CT_START, 0, 0);
ok_out: