diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2014-08-05 18:28:25 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-11 22:50:06 -0700 |
commit | 51becaa5e803bd21807f30524da58a578061541b (patch) | |
tree | f3d5f8fc21eb346891b1da06adba91d8f68557e4 | |
parent | 26be0b3a9f334f33f1a6e53706045eb02983d713 (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.
Change-Id: I0ac2e47679bf62b1493e0403178305923bc036e8
BUG: 1126932
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/8420
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/cluster/ec/src/ec.c | 41 |
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[] = |