diff options
author | Anand Avati <avati@redhat.com> | 2013-01-21 16:37:43 -0800 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-06 13:16:08 -0800 |
commit | 45c04e107c365d29ca9872b5e2d12c932bf43a24 (patch) | |
tree | bfffde34cfedcbea5e170e59da67b7543dfadce1 /tests | |
parent | c2953ea34c92f640cecf0f6575aa1acbdc5205b4 (diff) | |
download | glusterfs-45c04e107c365d29ca9872b5e2d12c932bf43a24.tar.gz glusterfs-45c04e107c365d29ca9872b5e2d12c932bf43a24.tar.xz glusterfs-45c04e107c365d29ca9872b5e2d12c932bf43a24.zip |
open-behind: translator to perform open calls in background
This is functionality peeled out of quick-read into a separate
translator.
Fops which modify the file (where it is required to perform the
operation on the true fd) will trigger and wait for the backend
open to succeed and use that fd.
Fops like fstat() readv() etc. will use anonymous FD (configurable)
when original fd is unopened at the backend.
Change-Id: Id9847fdbfdc82c1c8e956339156b6572539c1876
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4406
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/performance/open-behind.t | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/performance/open-behind.t b/tests/performance/open-behind.t new file mode 100755 index 0000000000..2524ce9e27 --- /dev/null +++ b/tests/performance/open-behind.t @@ -0,0 +1,45 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume info; + +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}; + +TEST $CLI volume start $V0; + +## Mount FUSE +TEST glusterfs -s $H0 --volfile-id $V0 $M0; + +TEST glusterfs -s $H0 --volfile-id $V0 $M1; + +D0="hello-this-is-a-test-message0"; +F0="test-file0"; + +function write_to() +{ + local file="$1"; + local data="$2"; + + echo "$data" > "$file"; +} + + +TEST write_to "$M0/$F0" "$D0"; +EXPECT "$D0" cat $M1/$F0; + +TEST $CLI volume set $V0 performance.open-behind off; + +D1="hello-this-is-a-test-message1"; +F1="test-file1"; + +TEST write_to "$M0/$F1" "$D1"; +EXPECT "$D1" cat $M1/$F1; + +EXPECT "$D0" cat $M1/$F0; + +cleanup; |