When doing a llapi_hsm_copy_end(), the FID sent to kernel should
be the DATA FID, when restoring. To be sure of that, the FID in
hsm_progress is used.
Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ic378b76716057044f33a670089d738c950e07702
Reviewed-on: http://review.whamcloud.com/7112
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@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>
copy->hc_errval = hp->hp_errval;
/* Update hai if it has changed since start */
copy->hc_hai.hai_extent = hp->hp_extent;
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)
rc = get_root_path(WANT_FD, NULL, &fd, mnt, -1);
if (rc)