summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-write.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-29 07:07:05 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-04-01 06:08:30 -0700
commit5c709704ab5767b55f4eef7cddea52e18e2a6d42 (patch)
tree33d69ea9ffe725170cf3d10fb6c555cb03ec6be0 /xlators/cluster/afr/src/afr-dir-write.c
parentd983f04c961304dc57d14c305751b0d1113c3a5d (diff)
cluster/afr: log enhancement - part 3
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c59
1 files changed, 2 insertions, 57 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index dceb059bb..06559ede0 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -123,12 +123,9 @@ afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
- uint64_t ctx;
- afr_fd_ctx_t *fd_ctx;
-
+ uint64_t ctx = 0;
+ afr_fd_ctx_t *fd_ctx = NULL;
int ret = 0;
-
int call_count = -1;
int child_index = -1;
@@ -229,7 +226,6 @@ afr_create_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -288,9 +284,7 @@ afr_create (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -302,8 +296,6 @@ 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.");
goto out;
}
@@ -367,7 +359,6 @@ afr_mknod_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
-
struct iatt *unwind_buf = NULL;
local = frame->local;
@@ -412,7 +403,6 @@ afr_mknod_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
int call_count = -1;
int child_index = -1;
@@ -484,7 +474,6 @@ afr_mknod_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -538,9 +527,7 @@ afr_mknod (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -552,8 +539,6 @@ 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.");
goto out;
}
@@ -617,7 +602,6 @@ afr_mkdir_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
-
struct iatt *unwind_buf = NULL;
local = frame->local;
@@ -662,7 +646,6 @@ afr_mkdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
int call_count = -1;
int child_index = -1;
@@ -735,7 +718,6 @@ afr_mkdir_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -790,9 +772,7 @@ afr_mkdir (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -804,8 +784,6 @@ 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.");
goto out;
}
@@ -869,7 +847,6 @@ afr_link_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
-
struct iatt *unwind_buf = NULL;
local = frame->local;
@@ -914,7 +891,6 @@ afr_link_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
int call_count = -1;
int child_index = -1;
@@ -975,7 +951,6 @@ afr_link_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -1028,9 +1003,7 @@ afr_link (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -1042,8 +1015,6 @@ 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.");
goto out;
}
@@ -1106,7 +1077,6 @@ afr_symlink_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
-
struct iatt *unwind_buf = NULL;
local = frame->local;
@@ -1151,7 +1121,6 @@ afr_symlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
int call_count = -1;
int child_index = -1;
@@ -1222,7 +1191,6 @@ afr_symlink_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -1278,9 +1246,7 @@ afr_symlink (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -1292,8 +1258,6 @@ 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.");
goto out;
}
@@ -1355,7 +1319,6 @@ afr_rename_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
-
struct iatt *unwind_buf = NULL;
local = frame->local;
@@ -1403,7 +1366,6 @@ afr_rename_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *prenewparent, struct iatt *postnewparent)
{
afr_local_t * local = NULL;
-
int call_count = -1;
int child_index = -1;
@@ -1457,7 +1419,6 @@ afr_rename_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -1510,9 +1471,7 @@ afr_rename (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -1524,8 +1483,6 @@ 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.");
goto out;
}
@@ -1619,7 +1576,6 @@ afr_unlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
int call_count = -1;
int child_index = (long) cookie;
@@ -1671,7 +1627,6 @@ afr_unlink_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -1724,9 +1679,7 @@ afr_unlink (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -1738,8 +1691,6 @@ 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.");
goto out;
}
@@ -1825,7 +1776,6 @@ afr_rmdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = NULL;
-
int call_count = -1;
int child_index = (long) cookie;
int read_child = 0;
@@ -1878,7 +1828,6 @@ afr_rmdir_wind (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
-
int call_count = -1;
int i = 0;
@@ -1931,9 +1880,7 @@ afr_rmdir (call_frame_t *frame, xlator_t *this,
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
call_frame_t * transaction_frame = NULL;
-
int ret = -1;
-
int op_ret = -1;
int op_errno = 0;
@@ -1945,8 +1892,6 @@ 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.");
goto out;
}