Whamcloud - gitweb
LU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore.
[fs/lustre-release.git] / lustre / utils / liblustreapi_hsm.c
index 7274b07..695c0bc 100644 (file)
@@ -340,6 +340,9 @@ int llapi_hsm_copy_end(char *mnt, struct hsm_copy *copy,
        copy->hc_errval = hp->hp_errval;
        /* Update hai if it has changed since start */
        copy->hc_hai.hai_extent = hp->hp_extent;
+       /* In some cases, like restore, 2 FIDs are used. hp knows the right FID
+        * to use here. */
+       copy->hc_hai.hai_fid = hp->hp_fid;
 
        rc = get_root_path(WANT_FD, NULL, &fd, mnt, -1);
        if (rc)