Whamcloud - gitweb
LU-12031 mdt: explicit data version of DoM files 39/47139/7
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 25 Apr 2022 06:13:53 +0000 (09:13 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Jun 2023 21:47:07 +0000 (21:47 +0000)
commitaae3289adb2bbc192870f195b78044484f717e16
tree7541db862e6d0cbf269012359a07fc8d3a96c145
parent656fc937cfd3fc3b65cb21a7f93a6bd4cc07fc0e
LU-12031 mdt: explicit data version of DoM files

Use EA to store 'data_version' for DoM files explicitly.

Unlike OST objects the 'inode_version' of DoM file is changed
by metadata operations as well and that leads to problems
during HSM operations, e.g. writing HSM EA with file data
version inside causes DoM object version update making this
HSM EA version obsoleted, also any metadata update on
restored file makes it dirty and prevents second release.

DoM files have now explicitly updated 'data_version' in
addition to ordinary 'inode_version'. The 'data_version'
is updated along with 'inode_version' upon write/truncate and
fallocate operations and is stored as 'trusted.dataver' EA.
Layout swap procedure is updated to move data version between
files being swept along with HSM attributes.
If DoM file is migrated to RAID0 file then 'dataver' EA is
deleted.

Corresponding test 1f is added to sanity-hsm.sh and
207j to sanity.sh.

Test-Parameters: clientversion=2.12.4 testlist=sanity-hsm
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I4689c56394c7323d32cd6f7dd86f58beb6e53353
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47139
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/include/dt_object.h
lustre/include/lu_target.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/file.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c
lustre/mdt/mdt_io.c
lustre/obdclass/dt_object.c
lustre/target/tgt_lastrcvd.c
lustre/tests/sanity-hsm.sh
lustre/tests/sanity.sh