Whamcloud - gitweb
LU-17863 hsm: add ioctl to set data version in HSM xattr
When migrating files to a Lustre filesystem (e.g. from another Lustre
filesystem), certain HSM solutions might prefer to bypass the Lustre
HSM subsystem, i.e. not use use llapi_hsm_import(), the Lustre HSM
coordinator and a copytool and instead just copy files to the
filesystem, as this enables a simpler workflow.
Since there already exists another copy of some of the files, users
might want to set the HS_EXISTS and HS_ARCHIVED HSM flags and perform
an HSM release operation to free disk space; however, the latter
operation fails in mdt_hsm_release(), as there is a data version
mismatch between the data version that is sent from the client, which
has been calculated from the OSTs and the data version in the HSM
xattr, as the latter hasn't been set appropriately via
hsm_cdt_request_completed(), as the Lustre HSM subsystem was bypassed
and the relevant HSM flags were force-set via llapi_hsm_state_set().
Add an ioctl to set the data version field in the HSM xattr to a
specified value and enable "lfs data_version" to synchronize it, to
the data version that is calculated from the OST objects.
HPE-bug-id: LUS-12152
Signed-off-by: Nikitas Angelinas <nikitas.angelinas@hpe.com>
Change-Id: Ic8538aa884c675e8561cbc4e2b1d83d64e23a67a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55599
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 files changed: