diff options
author | Soumya Koduri <skoduri@redhat.com> | 2015-03-24 10:30:31 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-03-31 11:16:26 -0700 |
commit | 25f97b2788a33efcb0714ad639f8db380b864982 (patch) | |
tree | 9720bdd09e04239dcd75bdb88ddc97623ec6fb44 /tests/basic | |
parent | e6f5ace08ad0a068cb49d3ca1274a27aa031992b (diff) |
Upcall: Added xlator options to enable cache-invalidation
Added two xlator options to enable cache-invalidation and set
cache-invalidation-timeout.
In addition, made few minor changes in the upcall processing code
in gfapi.
Change-Id: Ie0b32ca8348e34e3fe4f1e7df30cc925fa4aad31
BUG: 1200271
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/9975
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/basic')
-rw-r--r-- | tests/basic/gfapi/upcall-cache-invalidate.c | 4 | ||||
-rwxr-xr-x | tests/basic/gfapi/upcall-cache-invalidate.sh | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/basic/gfapi/upcall-cache-invalidate.c b/tests/basic/gfapi/upcall-cache-invalidate.c index e91d05d4058..64811f3274a 100644 --- a/tests/basic/gfapi/upcall-cache-invalidate.c +++ b/tests/basic/gfapi/upcall-cache-invalidate.c @@ -42,7 +42,7 @@ main (int argc, char *argv[]) char *logfile = NULL; char *volname = NULL; - cbk.handle = NULL; + cbk.object = NULL; if (argc != 3) { fprintf (stderr, "Invalid argument\n"); @@ -147,7 +147,7 @@ main (int argc, char *argv[]) if (cnt > 2) { ret = glfs_h_poll_upcall(fs_tmp, &cbk); LOG_ERR ("glfs_h_poll_upcall", ret); - if (cbk.handle) { + if (cbk.object) { fprintf (stderr, " upcall event type - %d," " flags - %d, expire_time_attr - %d\n" , cbk.reason, cbk.flags, cbk.expire_time_attr); diff --git a/tests/basic/gfapi/upcall-cache-invalidate.sh b/tests/basic/gfapi/upcall-cache-invalidate.sh index 20aeb1ec27a..f6f59bea752 100755 --- a/tests/basic/gfapi/upcall-cache-invalidate.sh +++ b/tests/basic/gfapi/upcall-cache-invalidate.sh @@ -22,6 +22,9 @@ EXPECT 'Started' volinfo_field $V0 'Status'; logdir=`gluster --print-logdir` +## Enable Upcall cache-invalidation feature +TEST $CLI volume set $V0 features.cache-invalidation on; + 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 |