Whamcloud - gitweb
LU-8820 hsm: skip LL_IOC_HSM_COPY_START for HSM removes 00/23700/4
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 23 Feb 2016 16:45:21 +0000 (10:45 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 16 Mar 2017 21:38:43 +0000 (21:38 +0000)
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>
lustre/utils/liblustreapi_hsm.c

index 345ab1b..8fe05b4 100644 (file)
@@ -1126,12 +1126,18 @@ int llapi_hsm_action_begin(struct hsm_copyaction_private **phcp,
                        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: