summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index dced4d07df6..68dc568bc65 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -244,9 +244,8 @@ __afr_selfheal_metadata_prepare (call_frame_t *frame, xlator_t *this, inode_t *i
return source;
}
-static int
-__afr_selfheal_metadata (call_frame_t *frame, xlator_t *this, inode_t *inode,
- unsigned char *locked_on)
+int
+afr_selfheal_metadata (call_frame_t *frame, xlator_t *this, inode_t *inode)
{
afr_private_t *priv = NULL;
int ret = -1;
@@ -309,35 +308,3 @@ unlock:
afr_replies_wipe (locked_replies, priv->child_count);
return ret;
}
-
-
-int
-afr_selfheal_metadata (call_frame_t *frame, xlator_t *this, inode_t *inode)
-{
- afr_private_t *priv = NULL;
- unsigned char *locked_on = NULL;
- int ret = 0;
-
- priv = this->private;
-
- locked_on = alloca0 (priv->child_count);
-
- ret = afr_selfheal_tryinodelk (frame, this, inode, priv->sh_domain, 0, 0,
- locked_on);
- {
- if (ret < AFR_SH_MIN_PARTICIPANTS) {
- /* 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_metadata (frame, this, inode, locked_on);
- }
-unlock:
- afr_selfheal_uninodelk (frame, this, inode, priv->sh_domain, 0, 0, locked_on);
-
- return ret;
-}