summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 1b9f8b2c..33a38ee7 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -220,3 +220,12 @@ function dht_get_layout {
local my_xa=trusted.glusterfs.dht
getfattr -d -e hex -n $my_xa $1 2> /dev/null | grep "$my_xa=" | cut -d= -f2
}
+
+##
+ # query pathinfo xattr and extract POSIX pathname(s)
+ ##
+function get_backend_paths {
+ local path=$1
+
+ getfattr -m . -n trusted.glusterfs.pathinfo $path | tr ' ' '\n' | sed -n 's/<POSIX.*:.*:\(.*\)>.*/\1/p'
+}