diff options
author | Anand V. Avati <avati@amp.gluster.com> | 2009-05-22 02:10:24 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-05-22 01:06:11 -0700 |
commit | 9cec4a0a790cc74106f92375506d7a16e09bdb10 (patch) | |
tree | 1f6dc3a5465b6a43136d8fa773058366e21824e0 /libglusterfs/src/xlator.c | |
parent | 99bf8da4764f425ac4022c9854acbd4247b6fdfc (diff) |
THIS: xlator_notify API to be used for propagating notifications with proper THIS setting
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r-- | libglusterfs/src/xlator.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 002cf90a9e3..61f8f6f4eab 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -807,6 +807,23 @@ xlator_fini_rec (xlator_t *xl) } +int +xlator_notify (xlator_t *xl, int event, void *data, ...) +{ + xlator_t *old_THIS = NULL; + int ret = 0; + + old_THIS = THIS; + THIS = xl; + + ret = xl->notify (xl, event, data); + + THIS = old_THIS; + + return ret; +} + + void xlator_tree_fini (xlator_t *xl) { |