summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-08-23 22:37:02 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-08 01:42:57 -0700
commit727c933a62e6b436c0aabcf80b6cd67620ee5429 (patch)
tree6a9b6046a3ca563cf06449600f38bab19cc8c9a8 /xlators/performance/stat-prefetch/src/stat-prefetch.c
parent1d8f96e8c88b698a6cd1ec1f1a54f1b8aef70504 (diff)
performance/stat-prefetch: implement release callbacks.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 6bbedf08c..4a25c8e45 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -1756,6 +1756,24 @@ sp_forget (xlator_t *this, inode_t *inode)
}
+int32_t
+sp_release (xlator_t *this, fd_t *fd)
+{
+ sp_fd_ctx_t *fd_ctx = NULL;
+ uint64_t value = 0;
+ int32_t ret = 0;
+
+ ret = fd_ctx_del (fd, this, &value);
+ if (!ret) {
+ fd_ctx = (void *)(long) value;
+ sp_fd_ctx_free (fd_ctx);
+ }
+
+ return 0;
+}
+
+
+
int32_t
init (xlator_t *this)
{
@@ -1817,5 +1835,7 @@ struct xlator_mops mops = {
};
struct xlator_cbks cbks = {
- .forget = sp_forget,
+ .forget = sp_forget,
+ .release = sp_release,
+ .releasedir = sp_release
};