Whamcloud - gitweb
LU-10357 hsm: open file to be archived before starting 21/30721/2
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 8 Dec 2017 19:59:43 +0000 (13:59 -0600)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 9 Feb 2018 16:58:02 +0000 (16:58 +0000)
commit56d0f3df87f4fecae028d7aace73f8979f54ae94
treeabaa076e5b977f4763e62cc007a7932d4c3479a2
parent10329bd6e9c8bb58ddf71cc1ce03d82bc6a731d8
LU-10357 hsm: open file to be archived before starting

In the archive case of llapi_hsm_action_begin(), open the file to be
archived before calling the LL_IOC_HSM_COPY_START ioctl. Store the
open FD in struct hsm_copyaction_private, return a dup of it
llapi_hsm_action_get_fd(), and close it in
llapi_hsm_action_end(). Calling open() first avoids 3 extra RPCs
(MDS_GETATTR, LDLM_ENQUEUE for layout to get data version,
LDLM_ENQUEUE for fstat()) when archiving.

Lustre-change: https://review.whamcloud.com/30456
Lustre-commit: 77cd1a21e312ca00b37b33689091734a12eec048

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idea0a7f4cb63bd9d712ff2ce9fcb59a3b278d0f2
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30721
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/utils/liblustreapi_hsm.c