diff options
-rw-r--r-- | tests/bugs/bug-1178079.t | 24 | ||||
-rw-r--r-- | xlators/features/snapview-client/src/snapview-client.c | 5 |
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/bugs/bug-1178079.t b/tests/bugs/bug-1178079.t new file mode 100644 index 00000000000..3ee4f730f3b --- /dev/null +++ b/tests/bugs/bug-1178079.t @@ -0,0 +1,24 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; + +#Create a volume +TEST glusterd; +TEST pidof glusterd; +TEST $CLI volume info; + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1..2}; +TEST $CLI volume start $V0; + +TEST $CLI volume set $V0 features.uss on; + +TEST glusterfs -s $H0 --volfile-id $V0 $M0; + +TEST touch $M0/file; + +TEST getfattr -d -m . -e hex $M0/file; + +cleanup; diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c index ad505633217..58f566ef520 100644 --- a/xlators/features/snapview-client/src/snapview-client.c +++ b/xlators/features/snapview-client/src/snapview-client.c @@ -791,6 +791,9 @@ svc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *name, * If the name variable matches this key then we have * to send back .snaps as the real filename. */ + if (!name) + goto stack_wind; + sscanf (name, "%[^:]:%[^@]", attrname, attrval); strcat (attrname, ":"); @@ -818,7 +821,7 @@ svc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *name, goto out; } } - +stack_wind: SVC_GET_SUBVOL_FROM_CTX (this, op_ret, op_errno, inode_type, ret, loc->inode, subvolume, out); |