summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-21 02:34:08 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-24 21:00:14 +0530
commit9c540ee5bf8a620db3855814db7b0f0f71644aac (patch)
treefc5765ac3e83f74008e7f8c75d95f87d1d577a6e /xlators/cluster/afr/src
parent04532fe34c582f551ec7d81b3fa6168f3a4a4d21 (diff)
Cleaned up log messages in replicate.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c8
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c18
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c24
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c20
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c39
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c54
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c96
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c21
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c9
-rw-r--r--xlators/cluster/afr/src/afr.c76
10 files changed, 179 insertions, 186 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index fd3fc1ba733..d5e181a5dd3 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -222,8 +222,8 @@ afr_readdir (call_frame_t *frame, xlator_t *this,
call_child = afr_first_up_child (priv);
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
@@ -314,8 +314,8 @@ afr_getdents (call_frame_t *frame, xlator_t *this,
call_child = afr_first_up_child (priv);
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up.");
goto out;
}
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index e357c7b1788..b07ac3c4800 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -127,7 +127,7 @@ afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = afr_fd_ctx_set (this, fd);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"could not set ctx on fd=%p", fd);
local->op_ret = -1;
@@ -262,7 +262,7 @@ afr_create (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -486,7 +486,7 @@ afr_mknod (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -710,7 +710,7 @@ afr_mkdir (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -935,7 +935,7 @@ afr_link (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1161,7 +1161,7 @@ afr_symlink (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1362,7 +1362,7 @@ afr_rename (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1553,7 +1553,7 @@ afr_unlink (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1739,7 +1739,7 @@ afr_rmdir (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 2fa8f9e3632..d2811acf06d 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -147,8 +147,8 @@ afr_access (call_frame_t *frame, xlator_t *this,
call_child = afr_first_up_child (priv);
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
@@ -269,8 +269,8 @@ afr_stat (call_frame_t *frame, xlator_t *this,
call_child = afr_first_up_child (priv);
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
@@ -396,8 +396,8 @@ afr_fstat (call_frame_t *frame, xlator_t *this,
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
@@ -516,8 +516,8 @@ afr_readlink (call_frame_t *frame, xlator_t *this,
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
@@ -634,8 +634,8 @@ afr_getxattr (call_frame_t *frame, xlator_t *this,
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
@@ -782,8 +782,8 @@ afr_readv (call_frame_t *frame, xlator_t *this,
call_child = afr_first_up_child (priv);
if (call_child == -1) {
op_errno = ENOTCONN;
- gf_log (this->name, GF_LOG_ERROR,
- "no child is up :(");
+ gf_log (this->name, GF_LOG_DEBUG,
+ "no child is up");
goto out;
}
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 8b568a0eaef..2b9d4d99b48 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -201,7 +201,7 @@ afr_chmod (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -395,7 +395,7 @@ afr_fchmod (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -589,7 +589,7 @@ afr_chown (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -786,7 +786,7 @@ afr_fchown (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -988,7 +988,7 @@ afr_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1192,7 +1192,7 @@ afr_truncate (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1389,7 +1389,7 @@ afr_ftruncate (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1588,7 +1588,7 @@ afr_utimens (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1780,7 +1780,7 @@ afr_setxattr (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1970,7 +1970,7 @@ afr_removexattr (call_frame_t *frame, xlator_t *this,
transaction_frame = copy_frame (frame);
if (!transaction_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 6a7f2d93c0b..e5291f6824a 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -107,7 +107,7 @@ afr_sh_print_pending_matrix (int32_t *pending_matrix[], xlator_t *this)
ptr += sprintf (ptr, "%d ", pending_matrix[i][j]);
}
ptr += sprintf (ptr, "]");
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"pending_matrix: %s", buf);
}
@@ -465,10 +465,11 @@ afr_sh_mark_sources (afr_self_heal_t *sh, int child_count,
characters[i].type = AFR_NODE_WISE;
} else {
- gf_log ("[module:afr]", GF_LOG_ERROR,
- "node %d is diabolical! "
- "(This message should never appear."
- " Please file a bug report.)", i);
+ gf_log ("[module:replicate]", GF_LOG_ERROR,
+ "Could not determine the state of subvolume %d!"
+ " (This message should never appear."
+ " Please file a bug report to "
+ "<gluster-devel@nongnu.org>.)", i);
}
}
@@ -720,12 +721,12 @@ afr_sh_missing_entries_done (call_frame_t *frame, xlator_t *this)
}
if (local->govinda_gOvinda) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"aborting selfheal of %s",
local->loc.path);
sh->completion_cbk (frame, this);
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"proceeding to metadata check on %s",
local->loc.path);
afr_self_heal_metadata (frame, this);
@@ -785,7 +786,7 @@ sh_missing_entries_finish (call_frame_t *frame, xlator_t *this)
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"unlocking %"PRId64"/%s on subvolume %s",
sh->parent_loc.inode->ino, local->loc.name,
priv->children[i]->name);
@@ -839,7 +840,7 @@ sh_missing_entries_newentry_cbk (call_frame_t *frame, void *cookie,
if (op_ret == 0) {
chown_frame = copy_frame (frame);
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"chown %s to %d %d on subvolume %s",
local->loc.path, buf->st_uid, buf->st_gid,
priv->children[child_index]->name);
@@ -893,7 +894,7 @@ sh_missing_entries_mknod (call_frame_t *frame, xlator_t *this)
st_mode = sh->buf[sh->source].st_mode;
st_dev = sh->buf[sh->source].st_dev;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"mknod %s mode 0%o on %d subvolumes",
local->loc.path, st_mode, enoent_count);
@@ -939,7 +940,7 @@ sh_missing_entries_mkdir (call_frame_t *frame, xlator_t *this)
st_mode = sh->buf[sh->source].st_mode;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"mkdir %s mode 0%o on %d subvolumes",
local->loc.path, st_mode, enoent_count);
@@ -983,7 +984,7 @@ sh_missing_entries_symlink (call_frame_t *frame, xlator_t *this,
call_count = enoent_count;
local->call_count = call_count;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"symlink %s -> %s on %d subvolumes",
local->loc.path, link, enoent_count);
@@ -1146,7 +1147,7 @@ sh_missing_entries_lookup_cbk (call_frame_t *frame, void *cookie,
LOCK (&frame->lock);
{
if (op_ret == 0) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"path %s on subvolume %s is of mode 0%o",
local->loc.path,
priv->children[child_index]->name,
@@ -1154,7 +1155,7 @@ sh_missing_entries_lookup_cbk (call_frame_t *frame, void *cookie,
local->self_heal.buf[child_index] = *buf;
} else {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"path %s on subvolume %s => -1 (%s)",
local->loc.path,
priv->children[child_index]->name,
@@ -1204,7 +1205,7 @@ sh_missing_entries_lookup (call_frame_t *frame, xlator_t *this)
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"looking up %s on subvolume %s",
local->loc.path, priv->children[i]->name);
@@ -1246,7 +1247,7 @@ sh_missing_entries_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
sh->op_failed = 1;
gf_log (this->name,
- (op_errno == EAGAIN ? GF_LOG_DEBUG : GF_LOG_ERROR),
+ GF_LOG_DEBUG,
"locking inode of %s on child %d failed: %s",
local->loc.path, child_index,
strerror (op_errno));
@@ -1287,7 +1288,7 @@ afr_self_heal_missing_entries (call_frame_t *frame, xlator_t *this)
sh = &local->self_heal;
priv = this->private;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"attempting to recreate missing entries for path=%s",
local->loc.path);
@@ -1328,7 +1329,7 @@ afr_self_heal (call_frame_t *frame, xlator_t *this,
sh = &local->self_heal;
priv = this->private;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"performing self heal on %s (metadata=%d data=%d entry=%d)",
local->loc.path,
local->need_metadata_self_heal,
@@ -1358,7 +1359,7 @@ afr_self_heal (call_frame_t *frame, xlator_t *this,
if (local->success_count && local->enoent_count) {
afr_self_heal_missing_entries (frame, this);
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"proceeding to metadata check on %s",
local->loc.path);
afr_sh_missing_entries_done (frame, this);
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 29ede007604..a14d90bca39 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -65,7 +65,7 @@ afr_sh_data_done (call_frame_t *frame, xlator_t *this)
TODO: cleanup sh->*
*/
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"self heal of %s completed",
local->loc.path);
@@ -129,7 +129,7 @@ afr_sh_data_close (call_frame_t *frame, xlator_t *this)
/* closed source */
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"closing fd of %s on %s",
local->loc.path, priv->children[sh->source]->name);
@@ -144,7 +144,7 @@ afr_sh_data_close (call_frame_t *frame, xlator_t *this)
if (sh->sources[i] || !local->child_up[i])
continue;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"closing fd of %s on %s",
local->loc.path, priv->children[i]->name);
@@ -175,12 +175,12 @@ afr_sh_data_unlck_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"locking inode of %s on child %d failed: %s",
local->loc.path, child_index,
strerror (op_errno));
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"inode of %s on child %d locked",
local->loc.path, child_index);
}
@@ -223,7 +223,7 @@ afr_sh_data_unlock (call_frame_t *frame, xlator_t *this)
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"unlocking %s on subvolume %s",
local->loc.path, priv->children[i]->name);
@@ -249,7 +249,7 @@ afr_sh_data_finish (call_frame_t *frame, xlator_t *this)
local = frame->local;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"finishing data selfheal of %s", local->loc.path);
afr_sh_data_unlock (frame, this);
@@ -323,7 +323,7 @@ afr_sh_data_erase_pending (call_frame_t *frame, xlator_t *this)
if (!erase_xattr[i])
continue;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"erasing pending flags from %s on %s",
local->loc.path, priv->children[i]->name);
@@ -367,13 +367,13 @@ afr_sh_data_trim_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1)
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"ftruncate of %s on subvolume %s failed (%s)",
local->loc.path,
priv->children[child_index]->name,
strerror (op_errno));
else
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"ftruncate of %s on subvolume %s completed",
local->loc.path,
priv->children[child_index]->name);
@@ -446,14 +446,14 @@ afr_sh_data_write_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
sh = &local->self_heal;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"wrote %d bytes of data from %s to child %d, offset %"PRId64"",
op_ret, local->loc.path, child_index, sh->offset - op_ret);
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"write to %s failed on subvolume %s (%s)",
local->loc.path,
priv->children[child_index]->name,
@@ -497,7 +497,7 @@ afr_sh_data_read_cbk (call_frame_t *frame, void *cookie,
local->call_count = call_count;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"read %d bytes of data from %s on child %d, offset %"PRId64"",
op_ret, local->loc.path, child_index, sh->offset);
@@ -581,7 +581,7 @@ afr_sh_data_read_write_iter (call_frame_t *frame, xlator_t *this)
}
if (sh->offset >= sh->file_size) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"closing fd's of %s",
local->loc.path);
afr_sh_data_trim_sinks (frame, this);
@@ -619,7 +619,7 @@ afr_sh_data_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_TRACE,
"open of %s failed on child %s (%s)",
local->loc.path,
priv->children[child_index]->name,
@@ -637,11 +637,11 @@ afr_sh_data_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
afr_sh_data_finish (frame, this);
return 0;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"fd for %s opened, commencing sync",
local->loc.path);
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"sourcing file %s from %s to other sinks",
local->loc.path, priv->children[sh->source]->name);
@@ -747,7 +747,7 @@ afr_sh_data_sync_prepare (call_frame_t *frame, xlator_t *this)
}
sh->active_sinks = active_sinks;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"syncing data of %s from subvolume %s to %d active sinks",
local->loc.path, priv->children[source]->name, active_sinks);
@@ -795,7 +795,7 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
&& (priv->favorite_child != -1)
&& (sh->child_errno[priv->favorite_child] == 0)) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_DEBUG,
"Picking favorite child %s as authentic source to resolve conflicting data of %s",
priv->children[priv->favorite_child]->name,
local->loc.path);
@@ -808,11 +808,9 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
if (nsources == -1) {
gf_log (this->name, GF_LOG_ERROR,
- "Unable to resolve conflicting data of %s. "
- "Please resolve manually by deleting the file %s "
- "from all but the preferred subvolume. "
- "Please consider 'option favorite-child <>'",
- local->loc.path, local->loc.path);
+ "Unable to self-heal contents of '%s' (possible split-brain). "
+ "Please delete the file from all but the preferred "
+ "subvolume.", local->loc.path);
local->govinda_gOvinda = 1;
@@ -949,12 +947,12 @@ afr_sh_data_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
sh->op_failed = 1;
gf_log (this->name,
- (op_errno == EAGAIN ? GF_LOG_DEBUG : GF_LOG_ERROR),
+ GF_LOG_DEBUG,
"locking of %s on child %d failed: %s",
local->loc.path, child_index,
strerror (op_errno));
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"inode of %s on child %d locked",
local->loc.path, child_index);
}
@@ -1002,7 +1000,7 @@ afr_sh_data_lock (call_frame_t *frame, xlator_t *this)
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"locking %s on subvolume %s",
local->loc.path, priv->children[i]->name);
@@ -1035,7 +1033,7 @@ afr_self_heal_data (call_frame_t *frame, xlator_t *this)
if (local->need_data_self_heal && priv->data_self_heal) {
afr_sh_data_lock (frame, this);
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"not doing data self heal on %s",
local->loc.path);
afr_sh_data_done (frame, this);
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 98ddbc46d35..fd603285f46 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -65,7 +65,7 @@ afr_sh_entry_done (call_frame_t *frame, xlator_t *this)
TODO: cleanup sh->*
*/
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"self heal of %s completed",
local->loc.path);
@@ -92,12 +92,12 @@ afr_sh_entry_unlck_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"unlocking inode of %s on child %d failed: %s",
local->loc.path, child_index,
strerror (op_errno));
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"unlocked inode of %s on child %d",
local->loc.path, child_index);
}
@@ -138,7 +138,7 @@ afr_sh_entry_unlock (call_frame_t *frame, xlator_t *this)
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"unlocking %s on subvolume %s",
local->loc.path, priv->children[i]->name);
@@ -165,7 +165,7 @@ afr_sh_entry_finish (call_frame_t *frame, xlator_t *this)
local = frame->local;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"finishing entry selfheal of %s", local->loc.path);
afr_sh_entry_unlock (frame, this);
@@ -239,7 +239,7 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this)
if (!erase_xattr[i])
continue;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"erasing pending flags from %s on %s",
local->loc.path, priv->children[i]->name);
@@ -357,7 +357,7 @@ build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name)
if (!child->path) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -370,7 +370,7 @@ build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name)
if (!child->inode) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -437,12 +437,12 @@ afr_sh_entry_expunge_remove_cbk (call_frame_t *expunge_frame, void *cookie,
active_src = (long) cookie;
if (op_ret == 0) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"removed %s on %s",
expunge_local->loc.path,
priv->children[active_src]->name);
} else {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"removing %s on %s failed (%s)",
expunge_local->loc.path,
priv->children[active_src]->name,
@@ -466,7 +466,7 @@ afr_sh_entry_expunge_rmdir (call_frame_t *expunge_frame, xlator_t *this,
priv = this->private;
expunge_local = expunge_frame->local;
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"removing directory %s on %s",
expunge_local->loc.path, priv->children[active_src]->name);
@@ -490,7 +490,7 @@ afr_sh_entry_expunge_unlink (call_frame_t *expunge_frame, xlator_t *this,
priv = this->private;
expunge_local = expunge_frame->local;
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"unlinking file %s on %s",
expunge_local->loc.path, priv->children[active_src]->name);
@@ -573,7 +573,7 @@ afr_sh_entry_expunge_lookup_cbk (call_frame_t *expunge_frame, void *cookie,
active_src = (long) cookie;
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"lookup of %s on %s failed (%s)",
expunge_local->loc.path,
priv->children[active_src]->name,
@@ -602,7 +602,7 @@ afr_sh_entry_expunge_purge (call_frame_t *expunge_frame, xlator_t *this,
priv = this->private;
expunge_local = expunge_frame->local;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"looking up %s on %s",
expunge_local->loc.path, priv->children[active_src]->name);
@@ -655,7 +655,7 @@ afr_sh_entry_expunge_entry_cbk (call_frame_t *expunge_frame, void *cookie,
expunge_local->loc.path,
priv->children[source]->name);
} else {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"looking up %s under %s failed (%s)",
expunge_local->loc.path,
priv->children[source]->name,
@@ -693,20 +693,20 @@ afr_sh_entry_expunge_entry (call_frame_t *frame, xlator_t *this,
if ((strcmp (name, ".") == 0)
|| (strcmp (name, "..") == 0)) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"skipping inspection of %s under %s",
name, local->loc.path);
goto out;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"inspecting existance of %s under %s",
name, local->loc.path);
expunge_frame = copy_frame (frame);
if (!expunge_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -722,7 +722,7 @@ afr_sh_entry_expunge_entry (call_frame_t *frame, xlator_t *this,
goto out;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"looking up %s on %s", expunge_local->loc.path,
priv->children[source]->name);
@@ -764,7 +764,7 @@ afr_sh_entry_expunge_readdir_cbk (call_frame_t *frame, void *cookie,
if (op_ret <= 0) {
if (op_ret < 0) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"readdir of %s on subvolume %s failed (%s)",
local->loc.path,
priv->children[active_src]->name,
@@ -785,7 +785,7 @@ afr_sh_entry_expunge_readdir_cbk (call_frame_t *frame, void *cookie,
entry_count++;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"readdir'ed %d entries from %s",
entry_count, priv->children[active_src]->name);
@@ -853,7 +853,7 @@ afr_sh_entry_expunge_all (call_frame_t *frame, xlator_t *this)
goto out;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"expunging entries of %s on %s to other sinks",
local->loc.path, priv->children[active_src]->name);
@@ -926,12 +926,12 @@ afr_sh_entry_impunge_utimens_cbk (call_frame_t *impunge_frame, void *cookie,
child_index = (long) cookie;
if (op_ret == 0) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"utimes set for %s on %s",
impunge_local->loc.path,
priv->children[child_index]->name);
} else {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"setting utimes of %s on %s failed (%s)",
impunge_local->loc.path,
priv->children[child_index]->name,
@@ -980,7 +980,7 @@ afr_sh_entry_impunge_chown_cbk (call_frame_t *impunge_frame, void *cookie,
impunge_local->loc.path,
priv->children[child_index]->name);
} else {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"setting ownership of %s on %s failed (%s)",
impunge_local->loc.path,
priv->children[child_index]->name,
@@ -1043,7 +1043,7 @@ afr_sh_entry_impunge_xattrop_cbk (call_frame_t *impunge_frame, void *cookie,
child_index = (long) cookie;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"setting ownership of %s on %s to %d/%d",
impunge_local->loc.path,
priv->children[child_index]->name,
@@ -1092,7 +1092,7 @@ afr_sh_entry_impunge_newfile_cbk (call_frame_t *impunge_frame, void *cookie,
child_index = (long) cookie;
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"creation of %s on %s failed (%s)",
impunge_local->loc.path,
priv->children[child_index]->name,
@@ -1155,7 +1155,7 @@ afr_sh_entry_impunge_mknod (call_frame_t *impunge_frame, xlator_t *this,
impunge_local = impunge_frame->local;
impunge_sh = &impunge_local->self_heal;
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"creating file %s mode=0%o dev=0x%"GF_PRI_DEV" on %s",
impunge_local->loc.path,
stbuf->st_mode, stbuf->st_rdev,
@@ -1186,7 +1186,7 @@ afr_sh_entry_impunge_mkdir (call_frame_t *impunge_frame, xlator_t *this,
impunge_local = impunge_frame->local;
impunge_sh = &impunge_local->self_heal;
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"creating directory %s mode=0%o on %s",
impunge_local->loc.path,
stbuf->st_mode,
@@ -1215,7 +1215,7 @@ afr_sh_entry_impunge_symlink (call_frame_t *impunge_frame, xlator_t *this,
impunge_local = impunge_frame->local;
impunge_sh = &impunge_local->self_heal;
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_TRACE,
"creating symlink %s -> %s on %s",
impunge_local->loc.path, linkname,
priv->children[child_index]->name);
@@ -1253,7 +1253,7 @@ afr_sh_entry_impunge_readlink_cbk (call_frame_t *impunge_frame, void *cookie,
child_index = (long) cookie;
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"readlink of %s on %s failed (%s)",
impunge_local->loc.path,
priv->children[active_src]->name,
@@ -1331,7 +1331,7 @@ afr_sh_entry_impunge_recreate_lookup_cbk (call_frame_t *impunge_frame,
active_src = impunge_sh->active_source;
if (op_ret != 0) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"looking up %s on %s (for %s) failed (%s)",
impunge_local->loc.path,
priv->children[active_src]->name,
@@ -1453,7 +1453,7 @@ afr_sh_entry_impunge_entry_cbk (call_frame_t *impunge_frame, void *cookie,
impunge_local->loc.path,
priv->children[child_index]->name);
} else {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"looking up %s under %s failed (%s)",
impunge_local->loc.path,
priv->children[child_index]->name,
@@ -1512,7 +1512,7 @@ afr_sh_entry_impunge_entry (call_frame_t *frame, xlator_t *this,
impunge_frame = copy_frame (frame);
if (!impunge_frame) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
goto out;
}
@@ -1548,7 +1548,7 @@ afr_sh_entry_impunge_entry (call_frame_t *frame, xlator_t *this,
if (sh->sources[i] == 1)
continue;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"looking up %s on %s", impunge_local->loc.path,
priv->children[i]->name);
@@ -1594,13 +1594,13 @@ afr_sh_entry_impunge_readdir_cbk (call_frame_t *frame, void *cookie,
if (op_ret <= 0) {
if (op_ret < 0) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"readdir of %s on subvolume %s failed (%s)",
local->loc.path,
priv->children[active_src]->name,
strerror (op_errno));
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"readdir of %s on subvolume %s complete",
local->loc.path,
priv->children[active_src]->name);
@@ -1615,7 +1615,7 @@ afr_sh_entry_impunge_readdir_cbk (call_frame_t *frame, void *cookie,
entry_count++;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"readdir'ed %d entries from %s",
entry_count, priv->children[active_src]->name);
@@ -1679,7 +1679,7 @@ afr_sh_entry_impunge_all (call_frame_t *frame, xlator_t *this)
return 0;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"impunging entries of %s on %s to other sinks",
local->loc.path, priv->children[active_src]->name);
@@ -1712,7 +1712,7 @@ afr_sh_entry_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"opendir of %s failed on child %s (%s)",
local->loc.path,
priv->children[child_index]->name,
@@ -1729,7 +1729,7 @@ afr_sh_entry_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
afr_sh_entry_finish (frame, this);
return 0;
}
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"fd for %s opened, commencing sync",
local->loc.path);
@@ -1776,7 +1776,7 @@ afr_sh_entry_open (call_frame_t *frame, xlator_t *this)
sh->healing_fd = fd;
if (source != -1) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"opening directory %s on subvolume %s (source)",
local->loc.path, priv->children[source]->name);
@@ -1794,7 +1794,7 @@ afr_sh_entry_open (call_frame_t *frame, xlator_t *this)
if (sources[i] || !local->child_up[i])
continue;
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"opening directory %s on subvolume %s (sink)",
local->loc.path, priv->children[i]->name);
@@ -1845,7 +1845,7 @@ afr_sh_entry_sync_prepare (call_frame_t *frame, xlator_t *this)
return 0;
}
if (source == -1 && active_sinks < 2) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_DEBUG,
"cannot sync with 0 sources and 1 sink on dir %s",
local->loc.path);
afr_sh_entry_finish (frame, this);
@@ -2008,12 +2008,12 @@ afr_sh_entry_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
sh->op_failed = 1;
gf_log (this->name,
- (op_errno == EAGAIN ? GF_LOG_DEBUG : GF_LOG_ERROR),
+ GF_LOG_DEBUG,
"locking inode of %s on child %d failed: %s",
local->loc.path, child_index,
strerror (op_errno));
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"inode of %s on child %d locked",
local->loc.path, child_index);
}
@@ -2056,7 +2056,7 @@ afr_sh_entry_lock (call_frame_t *frame, xlator_t *this)
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"locking %s on subvolume %s",
local->loc.path, priv->children[i]->name);
@@ -2091,7 +2091,7 @@ afr_self_heal_entry (call_frame_t *frame, xlator_t *this)
if (local->need_entry_self_heal && priv->entry_self_heal) {
afr_sh_entry_lock (frame, this);
} else {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_TRACE,
"proceeding to completion on %s",
local->loc.path);
afr_sh_entry_done (frame, this);
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index 6468d7fc82a..f329dd828d9 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -72,7 +72,7 @@ afr_sh_metadata_done (call_frame_t *frame, xlator_t *this)
}
if (local->govinda_gOvinda) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_DEBUG,
"aborting selfheal of %s",
local->loc.path);
sh->completion_cbk (frame, this);
@@ -113,11 +113,6 @@ afr_sh_metadata_unlck_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
- LOCK (&frame->lock);
- {
- }
- UNLOCK (&frame->lock);
-
call_count = afr_frame_return (frame);
if (call_count == 0)
@@ -290,7 +285,7 @@ afr_sh_metadata_sync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&frame->lock);
{
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"setting attributes failed for %s on %s (%s)",
local->loc.path,
priv->children[child_index]->name,
@@ -439,7 +434,7 @@ afr_sh_metadata_getxattr_cbk (call_frame_t *frame, void *cookie,
source = sh->source;
if (op_ret == -1) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"getxattr of %s failed on subvolume %s (%s). proceeding without xattr",
local->loc.path, priv->children[source]->name,
strerror (op_errno));
@@ -555,11 +550,9 @@ afr_sh_metadata_fix (call_frame_t *frame, xlator_t *this)
if (nsources == -1) {
gf_log (this->name, GF_LOG_ERROR,
- "Unable to resolve conflicting metadata of %s. "
- "Please resolve manually by fixing the "
- "permissions/ownership of %s on your subvolumes. "
- "You can also consider 'option favorite-child <>'",
- local->loc.path, local->loc.path);
+ "Unable to self-heal permissions/ownership of '%s' "
+ "(possible split-brain). Please fix the file on "
+ "all backend volumes", local->loc.path);
local->govinda_gOvinda = 1;
@@ -721,7 +714,7 @@ afr_sh_metadata_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
sh->op_failed = 1;
gf_log (this->name,
- (op_errno == EAGAIN ? GF_LOG_DEBUG : GF_LOG_ERROR),
+ GF_LOG_DEBUG,
"locking of %s on child %d failed: %s",
local->loc.path, child_index,
strerror (op_errno));
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index d779bacc38a..828a6e9abac 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -583,7 +583,7 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
local->pending);
if (ret < 0)
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"failed to set pending entry");
@@ -631,7 +631,7 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this)
local->pending);
if (ret < 0)
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"failed to set pending entry");
/* fall through */
@@ -688,6 +688,7 @@ afr_changelog_pre_op_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"xattrop not supported by %s",
priv->children[child_index]->name);
local->op_ret = -1;
+
} else if (!child_went_down (op_ret, op_errno)) {
gf_log (this->name, GF_LOG_ERROR,
"xattrop failed on child %s: %s",
@@ -760,7 +761,7 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
local->pending);
if (ret < 0)
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"failed to set pending entry");
@@ -814,7 +815,7 @@ afr_changelog_pre_op (call_frame_t *frame, xlator_t *this)
local->pending);
if (ret < 0)
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"failed to set pending entry");
/* fall through */
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 3a37ab17b1c..8e3229e09b5 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -725,7 +725,7 @@ afr_fd_ctx_set (xlator_t *this, fd_t *fd)
fd_ctx = CALLOC (1, sizeof (afr_fd_ctx_t));
if (!fd_ctx) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory");
op_ret = -ENOMEM;
goto out;
@@ -736,7 +736,7 @@ afr_fd_ctx_set (xlator_t *this, fd_t *fd)
if (!fd_ctx->child_failed) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory");
op_ret = -ENOMEM;
goto out;
@@ -813,7 +813,7 @@ afr_open_cbk (call_frame_t *frame, void *cookie,
ret = afr_fd_ctx_set (this, fd);
if (ret < 0) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"could not set fd ctx for fd=%p",
fd);
@@ -854,11 +854,6 @@ afr_open (call_frame_t *frame, xlator_t *this,
if (afr_is_split_brain (this, loc->inode)) {
/* self-heal failed */
-
- gf_log (this->name, GF_LOG_WARNING,
- "returning EIO, file has to be manually corrected "
- "in the backend");
-
op_errno = EIO;
goto out;
}
@@ -2048,7 +2043,7 @@ afr_lk (call_frame_t *frame, xlator_t *this,
sizeof (*local->cont.lk.locked_nodes));
if (!local->cont.lk.locked_nodes) {
- gf_log (this->name, GF_LOG_ERROR, "out of memory :(");
+ gf_log (this->name, GF_LOG_ERROR, "Out of memory");
op_errno = ENOMEM;
goto out;
}
@@ -2116,9 +2111,6 @@ notify (xlator_t *this, int32_t event,
case GF_EVENT_CHILD_UP:
i = find_child_index (this, data);
- gf_log (this->name, GF_LOG_NORMAL,
- "subvolume %s came up", ((xlator_t *) data)->name);
-
child_up[i] = 1;
/*
@@ -2130,17 +2122,19 @@ notify (xlator_t *this, int32_t event,
if (child_up[i])
up_children++;
- if (up_children == 1)
+ if (up_children == 1) {
+ gf_log (this->name, GF_LOG_NORMAL,
+ "Subvolume '%s' came back up; "
+ "going online.", ((xlator_t *)data)->name);
+
default_notify (this, event, data);
+ }
break;
case GF_EVENT_CHILD_DOWN:
i = find_child_index (this, data);
- gf_log (this->name, GF_LOG_NORMAL,
- "subvolume %s went down", ((xlator_t *) data)->name);
-
child_up[i] = 0;
/*
@@ -2152,8 +2146,13 @@ notify (xlator_t *this, int32_t event,
if (child_up[i])
up_children++;
- if (up_children == 0)
+ if (up_children == 0) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "All subvolumes are down. Going offline "
+ "until atleast one of them comes back up.");
+
default_notify (this, event, data);
+ }
break;
@@ -2204,13 +2203,14 @@ init (xlator_t *this)
if (!this->children) {
gf_log (this->name, GF_LOG_ERROR,
- "AFR needs more than one child defined");
+ "replicate translator needs more than one "
+ "subvolume defined.");
return -1;
}
if (!this->parents) {
gf_log (this->name, GF_LOG_WARNING,
- "dangling volume. check volfile ");
+ "Volume is dangling.");
}
ALLOC_OR_GOTO (this->private, afr_private_t, out);
@@ -2234,8 +2234,8 @@ init (xlator_t *this)
ret = gf_string2boolean (self_heal, &priv->data_self_heal);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "invalid 'option data-self-heal %s' "
- "defaulting to data-self-heal as 'on'",
+ "Invalid 'option data-self-heal %s'. "
+ "Defaulting to data-self-heal as 'on'",
self_heal);
priv->data_self_heal = 1;
}
@@ -2247,8 +2247,8 @@ init (xlator_t *this)
ret = gf_string2boolean (self_heal, &priv->metadata_self_heal);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "invalid 'option metadata-self-heal %s' "
- "defaulting to metadata-self-heal as 'on'",
+ "Invalid 'option metadata-self-heal %s'. "
+ "Defaulting to metadata-self-heal as 'on'.",
self_heal);
priv->metadata_self_heal = 1;
}
@@ -2259,8 +2259,8 @@ init (xlator_t *this)
ret = gf_string2boolean (self_heal, &priv->entry_self_heal);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "invalid 'option entry-self-heal %s' "
- "defaulting to entry-self-heal as 'on'",
+ "Invalid 'option entry-self-heal %s'. "
+ "Defaulting to entry-self-heal as 'on'.",
self_heal);
priv->entry_self_heal = 1;
}
@@ -2278,8 +2278,8 @@ init (xlator_t *this)
ret = gf_string2boolean (change_log, &priv->data_change_log);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "invalid 'option data-change-log %s'. "
- "defaulting to data-change-log as 'on'",
+ "Invalid 'option data-change-log %s'. "
+ "Defaulting to data-change-log as 'on'.",
change_log);
priv->data_change_log = 1;
}
@@ -2292,8 +2292,8 @@ init (xlator_t *this)
&priv->metadata_change_log);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "invalid 'option metadata-change-log %s'. "
- "defaulting to metadata-change-log as 'off'",
+ "Invalid 'option metadata-change-log %s'. "
+ "Defaulting to metadata-change-log as 'off'.",
change_log);
priv->metadata_change_log = 0;
}
@@ -2305,8 +2305,8 @@ init (xlator_t *this)
ret = gf_string2boolean (change_log, &priv->entry_change_log);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "invalid 'option entry-change-log %s'. "
- "defaulting to entry-change-log as 'on'",
+ "Invalid 'option entry-change-log %s'. "
+ "Defaulting to entry-change-log as 'on'.",
change_log);
priv->entry_change_log = 1;
}
@@ -2322,7 +2322,7 @@ init (xlator_t *this)
&lock_server_count);
if (dict_ret == 0) {
gf_log (this->name, GF_LOG_DEBUG,
- "setting data lock server count to %d",
+ "Setting data lock server count to %d.",
lock_server_count);
if (lock_server_count == 0)
@@ -2338,7 +2338,7 @@ init (xlator_t *this)
&lock_server_count);
if (dict_ret == 0) {
gf_log (this->name, GF_LOG_DEBUG,
- "setting metadata lock server count to %d",
+ "Setting metadata lock server count to %d.",
lock_server_count);
priv->metadata_lock_server_count = lock_server_count;
}
@@ -2348,7 +2348,7 @@ init (xlator_t *this)
&lock_server_count);
if (dict_ret == 0) {
gf_log (this->name, GF_LOG_DEBUG,
- "setting entry lock server count to %d",
+ "Setting entry lock server count to %d.",
lock_server_count);
priv->entry_lock_server_count = lock_server_count;
@@ -2358,7 +2358,7 @@ init (xlator_t *this)
while (trav) {
if (!read_ret && !strcmp (read_subvol, trav->xlator->name)) {
gf_log (this->name, GF_LOG_DEBUG,
- "subvolume '%s' specified as read child",
+ "Subvolume '%s' specified as read child.",
trav->xlator->name);
priv->read_child = child_count;
@@ -2385,7 +2385,7 @@ init (xlator_t *this)
priv->child_up = CALLOC (sizeof (unsigned char), child_count);
if (!priv->child_up) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
op_errno = ENOMEM;
goto out;
}
@@ -2393,7 +2393,7 @@ init (xlator_t *this)
priv->children = CALLOC (sizeof (xlator_t *), child_count);
if (!priv->children) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
op_errno = ENOMEM;
goto out;
}
@@ -2401,7 +2401,7 @@ init (xlator_t *this)
priv->pending_key = CALLOC (sizeof (*priv->pending_key), child_count);
if (!priv->pending_key) {
gf_log (this->name, GF_LOG_ERROR,
- "out of memory :(");
+ "Out of memory.");
op_errno = ENOMEM;
goto out;
}