diff options
Diffstat (limited to 'tests/volume.rc')
-rw-r--r-- | tests/volume.rc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc index 5bb974e1f50..b358b108d9d 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -237,6 +237,26 @@ function dht_get_layout { getfattr -d -e hex -n $my_xa $1 2> /dev/null | grep "$my_xa=" | cut -d= -f2 } +function afr_get_specific_changelog_xattr () +{ + local path=$1 + local key=$2 + local type=$3 + local specific_changelog="" + + changelog_xattr=$(afr_get_changelog_xattr "$path" "$key") + if [ "$type" == "data" ]; then + specific_changelog=${changelog_xattr:2:8} + elif [ "$type" == "metadata" ]; then + specific_changelog=${changelog_xattr:10:8} + elif [ "$type" == "entry" ]; then + specific_changelog=${changelog_xattr:18:8} + else + specific_changlog="error" + fi + + echo $specific_changelog +} ## # query pathinfo xattr and extract POSIX pathname(s) ## |