From a78dfebb7343671b0a3a0af8b46951894a3cf7a4 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 12 Feb 2014 17:23:28 +0530 Subject: add build-gfid option to enable pgfid tracking ... .. for inode to pathname mapping Change-Id: I0486d85b02e86d739fc1d8ea16d118fb666abf60 BUG: 1064863 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/6989 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/basic/pgfid-feat.t | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/basic/pgfid-feat.t (limited to 'tests/basic') diff --git a/tests/basic/pgfid-feat.t b/tests/basic/pgfid-feat.t new file mode 100644 index 000000000..8784cc7bf --- /dev/null +++ b/tests/basic/pgfid-feat.t @@ -0,0 +1,36 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +function get_ancestry_path() { + local path=$1 + local ancestry=$(getfattr --absolute-names -e text -n glusterfs.ancestry.path "$M0/$path" | grep "^glusterfs.ancestry.path" | cut -d"=" -f2 | tr -d \"); + echo $ancestry; +} + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume info; + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4}; +TEST $CLI volume start $V0; +TEST glusterfs -s $H0 --volfile-id $V0 $M0; + +TEST $CLI volume set $V0 build-pgfid on; + +TEST mkdir $M0/a; +TEST touch $M0/a/b; + +getfattr -e text -n glusterfs.ancestry.path "$M0/a/b" | grep "^glusterfs.ancestry.path" | cut -d"=" -f2 | tr -d \"; +EXPECT "/a/b" get_ancestry_path "/a/b"; + +TEST $CLI volume set $V0 build-pgfid off; +TEST ! getfattr -e text -n "glusterfs.ancestry.path" $M0/a/b; + +TEST $CLI volume stop $V0; +TEST $CLI volume delete $V0; + +cleanup; -- cgit From f69e85511645fcbd0526e38ca88dd3e5bf0ed917 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Mon, 17 Feb 2014 20:42:42 +0530 Subject: feature/compress: Validate option and enable doc * Validate network.compression option * Enable descriptions of xlator configurable options * Improve indentation in code * Make network.compression.mode not configurable by user. This is similar to "iam-self-heal-daemon" option in AFR xlator. Fixes BUGs: 1065658, 1065640, 1065655 Change-Id: I99d82b574ee0e5c8c2baf5f5d52dbf8d015d330a BUG: 1065640 Signed-off-by: Prashanth Pai Reviewed-on: http://review.gluster.org/7024 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/basic/cdc.t | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/basic') diff --git a/tests/basic/cdc.t b/tests/basic/cdc.t index 69f39f7d1..70d2171a8 100755 --- a/tests/basic/cdc.t +++ b/tests/basic/cdc.t @@ -21,18 +21,16 @@ EXPECT 'off' volinfo_field $V0 'performance.io-cache' TEST $CLI volume set $V0 performance.quick-read off EXPECT 'off' volinfo_field $V0 'performance.quick-read' -TEST $CLI volume set $V0 strict-write-ordering on +TEST $CLI volume set $V0 performance.strict-write-ordering on EXPECT 'on' volinfo_field $V0 'performance.strict-write-ordering' ## Turn on cdc xlator by setting network.compression to on TEST $CLI volume set $V0 network.compression on EXPECT 'on' volinfo_field $V0 'network.compression' -EXPECT 'server' volinfo_field $V0 'network.compression.mode' ## Make sure that user cannot change network.compression.mode ## This would break the cdc xlator if allowed! -TEST $CLI volume set $V0 network.compression.mode client -EXPECT 'server' volinfo_field $V0 'network.compression.mode' +TEST ! $CLI volume set $V0 network.compression.mode client ## Turn on network.compression.debug option ## This will dump compressed data onto disk as gzip file @@ -44,6 +42,7 @@ EXPECT 'on' volinfo_field $V0 'network.compression.debug' TEST $CLI volume start $V0; EXPECT 'Started' volinfo_field $V0 'Status'; +sleep 2 ## Mount FUSE with caching disabled TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0; @@ -121,7 +120,6 @@ TEST umount $M0 ## Reset the network.compression options TEST $CLI volume reset $V0 network.compression.debug TEST $CLI volume reset $V0 network.compression.min-size -TEST $CLI volume reset $V0 network.compression.mode TEST $CLI volume reset $V0 network.compression ## Stop the volume -- cgit