From 2a4561ef08b8be3b7d79b951252e87ba8f987120 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Mon, 16 Feb 2015 11:47:58 +0530 Subject: gfapi: APIs to store and process upcall notifications received In case of any upcall cbk events received by the protocol/client, gfapi will be notified which queues them up in a list (). Applicatons are responsible to provide APIs to process & notify them in case of any such upcall events queued. Added a new API which will be used by Ganesha to repeatedly poll for any such upcall event notified (). A new test-file has been added to test the cache_invalidation upcall events. Below link has a writeup which explains the code changes done - URL: https://soumyakoduri.wordpress.com/2015/02/25/glusterfs-understanding-upcall-infrastructure-and-cache-invalidation-support/ Change-Id: Iafc6880000c865fd4da22d0cfc388ec135b5a1c5 BUG: 1200262 Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/9536 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY --- tests/basic/gfapi/upcall-cache-invalidate.sh | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tests/basic/gfapi/upcall-cache-invalidate.sh (limited to 'tests/basic/gfapi/upcall-cache-invalidate.sh') diff --git a/tests/basic/gfapi/upcall-cache-invalidate.sh b/tests/basic/gfapi/upcall-cache-invalidate.sh new file mode 100755 index 00000000000..20aeb1ec27a --- /dev/null +++ b/tests/basic/gfapi/upcall-cache-invalidate.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +# Upcall feature is disable for now. A new xlator option +# will be introduced to turn it on. Skipping this test +# till then. + +SKIP_TESTS; +exit 0 + +TEST glusterd + +TEST $CLI volume create $V0 localhost:$B0/brick1; +EXPECT 'Created' volinfo_field $V0 'Status'; + +TEST $CLI volume start $V0; +EXPECT 'Started' volinfo_field $V0 'Status'; + +logdir=`gluster --print-logdir` + +build_tester $(dirname $0)/upcall-cache-invalidate.c -lgfapi -o $(dirname $0)/upcall-cache-invalidate + +TEST ./$(dirname $0)/upcall-cache-invalidate $V0 $logdir/upcall-cache-invalidate.log + +cleanup_tester $(dirname $0)/upcall-cache-invalidate + +TEST $CLI volume stop $V0 +TEST $CLI volume delete $V0 + +cleanup; -- cgit