diff options
author | Kotresh HR <khiremat@redhat.com> | 2018-05-25 08:55:11 -0400 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-05-28 04:57:22 +0000 |
commit | 3d38e4e47f129bdb36c3fbbd481dabe4ba4413d6 (patch) | |
tree | 984b6d3bf3a1554b9e47d964c9f7d89c251f6e34 /tests/basic/ctime/ctime-glfs-init.t | |
parent | 7d92af4eac386001b46b8f1a98e8ccb95ca1a225 (diff) |
libgfapi: Fix lookup on root
Lookup on root was sending "/" as the path.
This will break the basename calculation in
loc_copy and hence lookup on root was failing
if the loc_copy was involved in the stack.
With ctime, a first lookup on root initiates
a metadata self heal because of ctime xattr
not being same on all afr subvolumes. This
results in loc_copy and hence the failure
of lookup.
Fix would be to send path with "." for the root.
fixes: bz#1582516
Change-Id: Iafe4b99f249a4f5034ad34c1d30590de0e35aa0d
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'tests/basic/ctime/ctime-glfs-init.t')
-rw-r--r-- | tests/basic/ctime/ctime-glfs-init.t | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/basic/ctime/ctime-glfs-init.t b/tests/basic/ctime/ctime-glfs-init.t new file mode 100644 index 00000000000..0ecd80c2680 --- /dev/null +++ b/tests/basic/ctime/ctime-glfs-init.t @@ -0,0 +1,25 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +TEST glusterd + +TEST $CLI volume create $V0 replica 3 ${H0}:$B0/brick{1,2,3}; +TEST $CLI volume set $V0 performance.stat-prefetch off +TEST $CLI volume set $V0 ctime on +TEST $CLI volume set $V0 utime on +TEST $CLI volume start $V0; + +logdir=`gluster --print-logdir` + +TEST build_tester $(dirname $0)/ctime-glfs-init.c -lgfapi -lpthread + +TEST ./$(dirname $0)/ctime-glfs-init ${H0} $V0 $logdir/ctime-glfs-init.log + +cleanup_tester $(dirname $0)/ctime-glfs-init + +cleanup; + |