summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2010-10-18 00:16:32 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-18 03:25:50 -0700
commit5ade1467e0cad9687134f25be2b37a667be8ae1a (patch)
treeec5328f2077e7e46b4fee26aacf03496f93df49b
parentf213c1b051d7e91e33a2e4631a9ef383ae48921e (diff)
replicate: remove checks which prevented self-heal when open fds were present
this check is not needed anymore since the introduction of changelog piggybacking as the optimization technique instead of first-write-to-flush technique Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1235 (Bug for all pump/migrate commits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
-rw-r--r--xlators/cluster/afr/src/afr.c11
-rw-r--r--xlators/cluster/afr/src/afr.h1
2 files changed, 1 insertions, 11 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index ced89bdb1c9..3cdee3bf997 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -532,7 +532,6 @@ static void
afr_lookup_collect_xattr (afr_local_t *local, xlator_t *this,
int child_index, dict_t *xattr)
{
- uint32_t open_fd_count = 0;
uint32_t inodelk_count = 0;
uint32_t entrylk_count = 0;
@@ -547,11 +546,6 @@ afr_lookup_collect_xattr (afr_local_t *local, xlator_t *this,
if (afr_sh_has_data_pending (xattr, child_index, this))
local->self_heal.need_data_self_heal = _gf_true;
- ret = dict_get_uint32 (xattr, GLUSTERFS_OPEN_FD_COUNT,
- &open_fd_count);
- if (ret == 0)
- local->open_fd_count += open_fd_count;
-
ret = dict_get_uint32 (xattr, GLUSTERFS_INODELK_COUNT,
&inodelk_count);
if (ret == 0)
@@ -644,9 +638,7 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this, struct stat *lookup_buf)
&& ((!local->cont.lookup.is_revalidate)
|| (local->op_ret != -1))) {
- if (local->open_fd_count
- || local->inodelk_count
- || local->entrylk_count) {
+ if (local->inodelk_count || local->entrylk_count) {
/* Someone else is doing self-heal on this file.
So just make a best effort to set the read-subvolume
@@ -1044,7 +1036,6 @@ afr_lookup (call_frame_t *frame, xlator_t *this,
/* 3 = data+metadata+entry */
}
- ret = dict_set_uint64 (local->xattr_req, GLUSTERFS_OPEN_FD_COUNT, 0);
ret = dict_set_uint64 (local->xattr_req, GLUSTERFS_INODELK_COUNT, 0);
ret = dict_set_uint64 (local->xattr_req, GLUSTERFS_ENTRYLK_COUNT, 0);
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 17310c8fd96..a0861e5bae4 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -222,7 +222,6 @@ typedef struct _afr_local {
int32_t *child_errno;
dict_t *xattr_req;
- int open_fd_count;
int32_t inodelk_count;
int32_t entrylk_count;