summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-08-05 18:28:25 +0200
committerVijay Bellur <vbellur@redhat.com>2014-09-12 07:08:35 -0700
commit5b6ebde7fade37d2c261898ccc917abf16cc520a (patch)
tree906ab8ac56ccff3508804cd6aa081978af01c890 /xlators
parentfa599ee2de35d4538ae395935be2fbe8184f0806 (diff)
ec: Do not destroy inode context on inode invalidation
Currently there is no need to handle inode invalidation requests, so this callback has been removed. This is a backport of http://review.gluster.org/8420/ Change-Id: I0ac2e47679bf62b1493e0403178305923bc036e8 BUG: 1140846 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8702 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/ec/src/ec.c41
1 files changed, 13 insertions, 28 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index 3290df55732..8554f20df0d 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -782,20 +782,7 @@ int32_t ec_gf_zerofill(call_frame_t * frame, xlator_t * this, fd_t * fd,
return 0;
}
-void __ec_gf_release_fd(xlator_t * this, fd_t * fd)
-{
- uint64_t value = 0;
- ec_fd_t * ctx = NULL;
-
- if ((fd_ctx_del(fd, this, &value) == 0) && (value != 0))
- {
- ctx = (ec_fd_t *)(uintptr_t)value;
- loc_wipe(&ctx->loc);
- GF_FREE(ctx);
- }
-}
-
-void __ec_gf_release_inode(xlator_t * this, inode_t * inode)
+int32_t ec_gf_forget(xlator_t * this, inode_t * inode)
{
uint64_t value = 0;
ec_inode_t * ctx = NULL;
@@ -805,32 +792,33 @@ void __ec_gf_release_inode(xlator_t * this, inode_t * inode)
ctx = (ec_inode_t *)(uintptr_t)value;
GF_FREE(ctx);
}
-}
-
-int32_t ec_gf_forget(xlator_t * this, inode_t * inode)
-{
- __ec_gf_release_inode(this, inode);
return 0;
}
-int32_t ec_gf_invalidate(xlator_t * this, inode_t * inode)
+void ec_gf_release_fd(xlator_t * this, fd_t * fd)
{
- __ec_gf_release_inode(this, inode);
+ uint64_t value = 0;
+ ec_fd_t * ctx = NULL;
- return 0;
+ if ((fd_ctx_del(fd, this, &value) == 0) && (value != 0))
+ {
+ ctx = (ec_fd_t *)(uintptr_t)value;
+ loc_wipe(&ctx->loc);
+ GF_FREE(ctx);
+ }
}
int32_t ec_gf_release(xlator_t * this, fd_t * fd)
{
- __ec_gf_release_fd(this, fd);
+ ec_gf_release_fd(this, fd);
return 0;
}
int32_t ec_gf_releasedir(xlator_t * this, fd_t * fd)
{
- __ec_gf_release_fd(this, fd);
+ ec_gf_release_fd(this, fd);
return 0;
}
@@ -886,10 +874,7 @@ struct xlator_cbks cbks =
{
.forget = ec_gf_forget,
.release = ec_gf_release,
- .releasedir = ec_gf_releasedir,
- .invalidate = ec_gf_invalidate,
- .client_destroy = NULL,
- .client_disconnect = NULL
+ .releasedir = ec_gf_releasedir
};
struct volume_options options[] =