From b77c8ddda8e68c1086227b19f9fb5db9bf89b0dc Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Thu, 4 Jun 2015 11:25:35 +0530 Subject: Upcall/cache-invalidation: Ignore fops with frame->root->client not set Server-side internally generated fops like 'quota/marker' will not have any client associated with the frame. Hence we need a check for clients to be valid before processing for upcall cache invalidation. Also fixed an issue with initializing reaper-thread. Added a testcase to test the fix. Change-Id: If7419b98aca383f4b80711c10fef2e0b32498c57 BUG: 1227204 Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/10909 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: jiffin tony Thottan Tested-by: NetBSD Build System Reviewed-by: Niels de Vos --- tests/bugs/upcall/bug-1227204.t | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 tests/bugs/upcall/bug-1227204.t (limited to 'tests/bugs/upcall') diff --git a/tests/bugs/upcall/bug-1227204.t b/tests/bugs/upcall/bug-1227204.t new file mode 100755 index 00000000000..fc393b1837f --- /dev/null +++ b/tests/bugs/upcall/bug-1227204.t @@ -0,0 +1,29 @@ +#!/bin/bash + +# This regression test tries to ensure that quota limit-usage set work with +# features.cache-invalidation on. + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd; +TEST $CLI volume info; + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4,5,6}; +TEST $CLI volume start $V0; + +TEST $CLI volume set $V0 features.cache-invalidation on; +TEST $CLI volume quota $V0 enable; + +TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0; + +TEST mkdir -p $M0/1/2; +TEST $CLI volume quota $V0 limit-usage /1/2 100MB 70%; + +TEST $CLI volume status $V0 +TEST $CLI volume stop $V0 + +cleanup; -- cgit