summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-rebalance.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-06-02 16:39:35 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-10-05 23:11:02 -0700
commitc3dd76e9da783d879258cde17680f7d8747506f8 (patch)
treea839bcfd5de5375f83f9bad5bb8f8f316ebe5a3d /xlators/cluster/dht/src/dht-rebalance.c
parentdf06d94fae1e4a5e93f00c26d4b377bd8d1bd352 (diff)
fd: Do fd_bind on successful open
- fd_unref should decrement fd->inode->fd_count only if it is present in the inode's fd list. - successful open/opendir should perform fd_bind. >Change-Id: I81dd04f330e2fee86369a6dc7147af44f3d49169 >BUG: 1207735 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/11044 >Reviewed-by: Anoop C S <anoopcs@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1259697 Change-Id: I73b79dd3519aa085fb84dde74b321511cbccce1a Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12100 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index f99d19f3d69..b817c57f90c 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -509,6 +509,7 @@ __dht_rebalance_create_dst_file (xlator_t *to, xlator_t *from, loc_t *loc, struc
}
+ fd_bind (fd);
/*Reason of doing lookup after create again:
*In the create, there is some time-gap between opening fd at the
*server (posix_layer) and binding it in server (incrementing fd count),
@@ -782,6 +783,7 @@ __dht_rebalance_open_src_file (xlator_t *from, xlator_t *to, loc_t *loc,
goto out;
}
+ fd_bind (fd);
ret = -1;
dict = dict_new ();
if (!dict)
@@ -2281,6 +2283,7 @@ gf_defrag_process_dir (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
goto out;
}
+ fd_bind (fd);
dir_dfmeta = GF_CALLOC (1, sizeof (*dir_dfmeta),
gf_common_mt_pointer);
if (!dir_dfmeta) {
@@ -2581,6 +2584,7 @@ gf_defrag_fix_layout (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
goto out;
}
+ fd_bind (fd);
INIT_LIST_HEAD (&entries.list);
while ((ret = syncop_readdirp (this, fd, 131072, offset, &entries,
NULL, NULL)) != 0)