diff options
author | Anand Avati <avati@gluster.com> | 2010-09-29 06:53:35 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-29 06:34:42 -0700 |
commit | 0dc7064bd6047e9283d873f418d2e0a4e0ba29e6 (patch) | |
tree | 537f305c8a0744acb55aba09a1ebbef68b8400c2 /xlators | |
parent | b8c42e5cef817bdd0270b1991c0a365aa321f7cc (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
some of the self-healing issues with NFS mounts should be resolved
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
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 16 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 1 |
2 files changed, 1 insertions, 16 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 013415260..64e22c322 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -543,7 +543,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; @@ -568,11 +567,6 @@ afr_lookup_collect_xattr (afr_local_t *local, xlator_t *this, "data self-heal is pending for %s.", local->loc.path); } - 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) @@ -685,9 +679,7 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this, struct iatt *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 @@ -1105,12 +1097,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); - if (ret < 0) { - gf_log (this->name, GF_LOG_WARNING, - "Unable to set dict value."); - } - ret = dict_set_uint64 (local->xattr_req, GLUSTERFS_INODELK_COUNT, 0); if (ret < 0) { gf_log (this->name, GF_LOG_WARNING, diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index e64a6fe15..26f2c989f 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -293,7 +293,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; |