diff options
| author | Richard Wareing <rwareing@fb.com> | 2015-11-23 18:35:40 -0800 |
|---|---|---|
| committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-08-28 15:07:47 +0000 |
| commit | da0c8c10dc693f75524d6d9f71af87db98f4eda0 (patch) | |
| tree | 1c1f6103b8d94af557a80ac41d4700463d0679a4 | |
| parent | 2f343120302e7ed3ea42f276a0a92e557582ad51 (diff) | |
cluster/afr: Delete "special domain" AFR heal flow
Summary:
- Reverts code from 50998ae08c5a767468ee85cb5c53bb5554ff734a, this was
originally intended for backward compat w/3.5. This isn't relevant
for us, and everywhere we see stuck heals we tend to see this
"aaaaaaaaa" guy show up, so let's nuke it.
Test Plan: - Run heal prove tests
Reviewers: moox, dph, sshreyas
Reviewed By: sshreyas
Differential Revision: https://phabricator.fb.com/D2689678
Tasks: 6207062
Change-Id: Ie9db3eb6c6d44f6137ebcf964e06965047763ed9
Signed-off-by: Jeff Darcy <jdarcy@fb.com>
Reviewed-on: https://review.gluster.org/18121
Tested-by: Jeff Darcy <jeff@pl.atyp.us>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
| -rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 63 |
1 files changed, 15 insertions, 48 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 78c9f0a3ab9..25f8ea313aa 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -16,16 +16,6 @@ #include "afr-messages.h" #include "syncop-utils.h" -/* Max file name length is 255 this filename is of length 256. No file with - * this name can ever come, entry-lock with this name is going to prevent - * self-heals from older versions while the granular entry-self-heal is going - * on in newer version.*/ -#define LONG_FILENAME "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - static int afr_selfheal_entry_delete (xlator_t *this, inode_t *dir, const char *name, inode_t *inode, int child, struct afr_reply *replies) @@ -1104,45 +1094,22 @@ afr_selfheal_entry (call_frame_t *frame, xlator_t *this, inode_t *inode) ret = afr_selfheal_tie_breaker_entrylk (frame, this, inode, priv->sh_domain, NULL, locked_on); - { - if (ret < AFR_SH_MIN_PARTICIPANTS) { - gf_msg_debug (this->name, 0, "%s: Skipping " - "entry self-heal as only %d sub-volumes could " - "be locked in %s domain", - uuid_utoa (fd->inode->gfid), ret, - priv->sh_domain); - /* Either less than two subvols available, or another - selfheal (from another server) is in progress. Skip - for now in any case there isn't anything to do. - */ - ret = -ENOTCONN; - goto unlock; - } + if (ret < AFR_SH_MIN_PARTICIPANTS) { + gf_msg_debug (this->name, 0, "%s: Skipping " + "entry self-heal as only %d sub-volumes could " + "be locked in %s domain", + uuid_utoa (fd->inode->gfid), ret, + priv->sh_domain); + /* Either less than two subvols available, or another + selfheal (from another server) is in progress. Skip + for now in any case there isn't anything to do. + */ + ret = -ENOTCONN; + goto unlock; + } + + ret = __afr_selfheal_entry (frame, this, fd, locked_on); - if (!granular_locks) { - ret = afr_selfheal_tryentrylk (frame, this, inode, - this->name, LONG_FILENAME, - long_name_locked); - } - { - if (!granular_locks && ret < 1) { - gf_msg_debug (this->name, 0, "%s: Skipping" - " entry self-heal as only %d " - "sub-volumes could be " - "locked in special-filename " - "domain", - uuid_utoa (fd->inode->gfid), - ret); - ret = -ENOTCONN; - goto unlock; - } - ret = __afr_selfheal_entry (frame, this, fd, locked_on); - } - if (!granular_locks) - afr_selfheal_unentrylk (frame, this, inode, this->name, - LONG_FILENAME, long_name_locked, - NULL); - } unlock: afr_selfheal_unentrylk (frame, this, inode, priv->sh_domain, NULL, locked_on, NULL); |
