From: Aurelien Degremont Date: Thu, 6 Jun 2013 10:27:32 +0000 (+0200) Subject: LU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore. X-Git-Tag: 2.4.53~10 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F7112%2F2;p=fs%2Flustre-release.git LU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore. 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 Change-Id: Ic378b76716057044f33a670089d738c950e07702 Reviewed-on: http://review.whamcloud.com/7112 Tested-by: Hudson Reviewed-by: Faccini Bruno Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/liblustreapi_hsm.c b/lustre/utils/liblustreapi_hsm.c index 7274b07..695c0bc 100644 --- a/lustre/utils/liblustreapi_hsm.c +++ b/lustre/utils/liblustreapi_hsm.c @@ -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)