diff options
-rw-r--r-- | libglusterfs/src/fd.c | 7 | ||||
-rw-r--r-- | libglusterfs/src/inode.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-diskusage.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c index 59e702dd..c6b060c6 100644 --- a/libglusterfs/src/fd.c +++ b/libglusterfs/src/fd.c @@ -385,6 +385,7 @@ fd_destroy (fd_t *fd) { xlator_t *xl = NULL; int i = 0; + xlator_t *old_THIS = NULL; if (fd == NULL){ gf_log ("xlator", GF_LOG_ERROR, "invalid arugument"); @@ -402,16 +403,22 @@ fd_destroy (fd_t *fd) for (i = 0; i < fd->inode->table->xl->ctx->xl_count; i++) { if (fd->_ctx[i].key) { xl = (xlator_t *)(long)fd->_ctx[i].key; + old_THIS = THIS; + THIS = xl; if (xl->cbks->releasedir) xl->cbks->releasedir (xl, fd); + THIS = old_THIS; } } } else { for (i = 0; i < fd->inode->table->xl->ctx->xl_count; i++) { if (fd->_ctx[i].key) { xl = (xlator_t *)(long)fd->_ctx[i].key; + old_THIS = THIS; + THIS = xl; if (xl->cbks->release) xl->cbks->release (xl, fd); + THIS = old_THIS; } } } diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index bd068439..5b70ce5f 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -276,6 +276,7 @@ __inode_destroy (inode_t *inode) { int index = 0; xlator_t *xl = NULL; + xlator_t *old_THIS = NULL; if (!inode->_ctx) goto noctx; @@ -283,8 +284,11 @@ __inode_destroy (inode_t *inode) for (index = 0; index < inode->table->xl->ctx->xl_count; index++) { if (inode->_ctx[index].key) { xl = (xlator_t *)(long)inode->_ctx[index].key; + old_THIS = THIS; + THIS = xl; if (xl->cbks->forget) xl->cbks->forget (xl, inode); + THIS = old_THIS; } } diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c index bcc385a2..6344953d 100644 --- a/xlators/cluster/dht/src/dht-diskusage.c +++ b/xlators/cluster/dht/src/dht-diskusage.c @@ -210,7 +210,7 @@ dht_is_subvol_filled (xlator_t *this, xlator_t *subvol) UNLOCK (&conf->subvolume_lock); if (subvol_filled) { - if (!(conf->du_stats[i].log++ % GF_UNIVERSAL_ANSWER)) { + if (!(conf->du_stats[i].log++ % (GF_UNIVERSAL_ANSWER * 10))) { gf_log (this->name, GF_LOG_WARNING, "disk space on subvolume '%s' is getting " "full (%.2f %%), consider adding more nodes", |