diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2019-11-20 22:31:48 +0530 |
---|---|---|
committer | Xavi Hernandez <xhernandez@redhat.com> | 2019-12-19 12:41:14 +0000 |
commit | 3389bc58ea9773a66ed4bc7bd96b93dc1c97e4cc (patch) | |
tree | cd0deb6568b8e9ea692cd0f9b3f14ebc2582733e /tests | |
parent | d8adc66b79de3f21672884539a65327614e0c6bb (diff) |
tests/fuse/bug-965974.t: turn off md-cache, to fix failure of the test
Imagine the following set of operations:
1. touch $M0/file
2. ln $M0/file $M0/file.lnk
3. rm $M1/file
4. wait for md-cache-timeout
5. stat $M0/file.lnk $M0/file
stat on $M0/file in step 5 succeeds when md-cache-timeout is non-zero
even though it was removed from $M1. The reason is
1. fuse-bridge on $M0 would resolve both file and file.lnk to same
inode. This inode i1 is cached in md-cache.
2. After md-cache-timeout lookup on $M0/file.lnk would be sent to
backend. This lookup will be successful as file.lnk is present on
backend and would refresh the md-cache.
3. The lookup on $M0/file sent within md-cache-timeout after lookup on
$M0/file.lnk would be sent with i1. Since i1 was refreshed by
lookup on $M0/file.lnk, the cache is deemed valid and md-cache
responds lookup on $M0/file as success
To fix this failure we can either:
1. remove lookup on $M0/file.lnk, so that lookup on $M0/file is
actually sent to backend.
2. turn off md-cache
This patch chooses option 2.
credits: Csaba Henk <csaba@redhat.com>
Change-Id: I352c2acd377fe10c4bdf3b6e53c1de86a4e544c7
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Updates: bz#1756900
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/fuse/bug-985074.t | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/bugs/fuse/bug-985074.t b/tests/bugs/fuse/bug-985074.t index d10fd9f8b41..ffa6df54144 100644 --- a/tests/bugs/fuse/bug-985074.t +++ b/tests/bugs/fuse/bug-985074.t @@ -30,7 +30,7 @@ TEST glusterd TEST $CLI volume create $V0 $H0:$B0/$V0 TEST $CLI volume start $V0 -TEST $CLI volume set $V0 md-cache-timeout 3 +TEST $CLI volume set $V0 performance.stat-prefetch off TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --entry-timeout=0 --attribute-timeout=0 TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M1 --entry-timeout=0 --attribute-timeout=0 @@ -40,8 +40,7 @@ TEST ln $M0/file $M0/file.link TEST ls -ali $M0 $M1 TEST rm -f $M1/file.link TEST ls -ali $M0 $M1 -# expire the md-cache timeout -sleep 3 + TEST mv $M0/file $M0/file.link TEST stat $M0/file.link TEST ! stat $M0/file |