Whamcloud - gitweb
LU-12031 mdt: explicit data version of DoM files
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 25 Apr 2022 06:13:53 +0000 (09:13 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 29 Dec 2023 11:13:21 +0000 (11:13 +0000)
commit3bccd95ca25dc8a52b4961a14648c2fd93d2bc51
tree16e5b414b48c7eb228de3082b5c39a3fb888ad6f
parentb2be94f559c7639e93ad9ee02d3a2a0cdafa0172
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.

Lustre-change: https://review.whamcloud.com/47139
Lustre-commit: aae3289adb2bbc192870f195b78044484f717e16

Test-Parameters: clientversion=2.12.4 testlist=sanity-hsm
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I4689c56394c7323d32cd6f7dd86f58beb6e53353
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53214
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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