glusterfsd: whitespace cleanup

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
This commit is contained in:
Amar Tumballi 2011-03-16 09:39:15 +00:00 committed by Vijay Bellur
parent 532edf1c4a
commit ca6528592e
5 changed files with 98 additions and 98 deletions

View File

@ -1,20 +1,20 @@
/* /*
Copyright (c) 2006-2010 Gluster, Inc. <http://www.gluster.com> Copyright (c) 2006-2010 Gluster, Inc. <http://www.gluster.com>
This file is part of GlusterFS. This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify GlusterFS is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; either version 3 of the License, by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version. or (at your option) any later version.
GlusterFS is distributed in the hope that it will be useful, but GlusterFS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details. Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see along with this program. If not, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
*/ */
#ifndef __GLUSTERFSD_COMMON_H__ #ifndef __GLUSTERFSD_COMMON_H__

View File

@ -1,20 +1,20 @@
/* /*
Copyright (c) 2006-2010 Gluster, Inc. <http://www.gluster.com> Copyright (c) 2006-2010 Gluster, Inc. <http://www.gluster.com>
This file is part of GlusterFS. This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify GlusterFS is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; either version 3 of the License, by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version. or (at your option) any later version.
GlusterFS is distributed in the hope that it will be useful, but GlusterFS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details. Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see along with this program. If not, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
*/ */
#ifndef __GLUSTERFSD_MEM_TYPES_H__ #ifndef __GLUSTERFSD_MEM_TYPES_H__

View File

@ -451,39 +451,39 @@ static int oldvollen = 0;
static int static int
xlator_equal_rec (xlator_t *xl1, xlator_t *xl2) xlator_equal_rec (xlator_t *xl1, xlator_t *xl2)
{ {
xlator_list_t *trav1 = NULL; xlator_list_t *trav1 = NULL;
xlator_list_t *trav2 = NULL; xlator_list_t *trav2 = NULL;
int ret = 0; int ret = 0;
if (xl1 == NULL || xl2 == NULL) { if (xl1 == NULL || xl2 == NULL) {
gf_log ("xlator", GF_LOG_DEBUG, "invalid argument"); gf_log ("xlator", GF_LOG_DEBUG, "invalid argument");
return -1; return -1;
} }
trav1 = xl1->children; trav1 = xl1->children;
trav2 = xl2->children; trav2 = xl2->children;
while (trav1 && trav2) { while (trav1 && trav2) {
ret = xlator_equal_rec (trav1->xlator, trav2->xlator); ret = xlator_equal_rec (trav1->xlator, trav2->xlator);
if (ret) { if (ret) {
gf_log ("glusterfsd-mgmt", GF_LOG_DEBUG, gf_log ("glusterfsd-mgmt", GF_LOG_DEBUG,
"xlators children not equal"); "xlators children not equal");
goto out; goto out;
} }
trav1 = trav1->next; trav1 = trav1->next;
trav2 = trav2->next; trav2 = trav2->next;
} }
if (trav1 || trav2) { if (trav1 || trav2) {
ret = -1;
goto out;
}
if (strcmp (xl1->name, xl2->name)) {
ret = -1; ret = -1;
goto out; goto out;
} }
if (strcmp (xl1->name, xl2->name)) {
ret = -1;
goto out;
}
out : out :
return ret; return ret;
} }
@ -508,7 +508,7 @@ is_graph_topology_equal (glusterfs_graph_t *graph1,
goto out; goto out;
} }
ret = _gf_true; ret = _gf_true;
gf_log ("glusterfsd-mgmt", GF_LOG_DEBUG, gf_log ("glusterfsd-mgmt", GF_LOG_DEBUG,
"graphs are equal"); "graphs are equal");
@ -527,7 +527,7 @@ glusterfs_volfile_reconfigure (FILE *newvolfile_fp)
glusterfs_graph_t *oldvolfile_graph = NULL; glusterfs_graph_t *oldvolfile_graph = NULL;
glusterfs_graph_t *newvolfile_graph = NULL; glusterfs_graph_t *newvolfile_graph = NULL;
FILE *oldvolfile_fp = NULL; FILE *oldvolfile_fp = NULL;
glusterfs_ctx_t *ctx = NULL; glusterfs_ctx_t *ctx = NULL;
int ret = -1; int ret = -1;
@ -535,10 +535,10 @@ glusterfs_volfile_reconfigure (FILE *newvolfile_fp)
if (!oldvolfile_fp) if (!oldvolfile_fp)
goto out; goto out;
if (!oldvollen) { if (!oldvollen) {
ret = 1; // Has to call INIT for the whole graph ret = 1; // Has to call INIT for the whole graph
goto out; goto out;
} }
fwrite (oldvolfile, oldvollen, 1, oldvolfile_fp); fwrite (oldvolfile, oldvollen, 1, oldvolfile_fp);
fflush (oldvolfile_fp); fflush (oldvolfile_fp);
@ -566,21 +566,21 @@ glusterfs_volfile_reconfigure (FILE *newvolfile_fp)
"Only options have changed in the new " "Only options have changed in the new "
"graph"); "graph");
ctx = glusterfs_ctx_get (); ctx = glusterfs_ctx_get ();
if (!ctx) { if (!ctx) {
gf_log ("glusterfsd-mgmt", GF_LOG_ERROR, gf_log ("glusterfsd-mgmt", GF_LOG_ERROR,
"glusterfs_ctx_get() returned NULL"); "glusterfs_ctx_get() returned NULL");
goto out; goto out;
} }
oldvolfile_graph = ctx->active; oldvolfile_graph = ctx->active;
if (!oldvolfile_graph) { if (!oldvolfile_graph) {
gf_log ("glusterfsd-mgmt", GF_LOG_ERROR, gf_log ("glusterfsd-mgmt", GF_LOG_ERROR,
"glsuterfs_ctx->active is NULL"); "glsuterfs_ctx->active is NULL");
goto out; goto out;
} }
/* */ /* */
ret = glusterfs_graph_reconfigure (oldvolfile_graph, ret = glusterfs_graph_reconfigure (oldvolfile_graph,
@ -963,7 +963,7 @@ mgmt_pmap_signout_cbk (struct rpc_req *req, struct iovec *iov, int count,
pmap_signout_rsp rsp = {0,}; pmap_signout_rsp rsp = {0,};
call_frame_t *frame = NULL; call_frame_t *frame = NULL;
int ret = 0; int ret = 0;
glusterfs_ctx_t *ctx = NULL; glusterfs_ctx_t *ctx = NULL;
frame = myframe; frame = myframe;

View File

@ -863,8 +863,8 @@ set_log_file_path (cmd_args_t *cmd_args)
tmp_str[j] = '-'; tmp_str[j] = '-';
} }
ret = gf_asprintf (&cmd_args->log_file, ret = gf_asprintf (&cmd_args->log_file,
DEFAULT_LOG_FILE_DIRECTORY "/%s.log", DEFAULT_LOG_FILE_DIRECTORY "/%s.log",
tmp_str); tmp_str);
if (ret == -1) { if (ret == -1) {
gf_log ("glusterfsd", GF_LOG_ERROR, gf_log ("glusterfsd", GF_LOG_ERROR,
"asprintf failed while setting up log-file"); "asprintf failed while setting up log-file");

View File

@ -1,20 +1,20 @@
/* /*
Copyright (c) 2006-2010 Gluster, Inc. <http://www.gluster.com> Copyright (c) 2006-2010 Gluster, Inc. <http://www.gluster.com>
This file is part of GlusterFS. This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify GlusterFS is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; either version 3 of the License, by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version. or (at your option) any later version.
GlusterFS is distributed in the hope that it will be useful, but GlusterFS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details. Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see along with this program. If not, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
*/ */
#ifndef __GLUSTERFSD_H__ #ifndef __GLUSTERFSD_H__
@ -47,26 +47,26 @@
#define ENABLE_DEBUG_MODE 1 #define ENABLE_DEBUG_MODE 1
enum argp_option_keys { enum argp_option_keys {
ARGP_VOLFILE_SERVER_KEY = 's', ARGP_VOLFILE_SERVER_KEY = 's',
ARGP_VOLUME_FILE_KEY = 'f', ARGP_VOLUME_FILE_KEY = 'f',
ARGP_LOG_LEVEL_KEY = 'L', ARGP_LOG_LEVEL_KEY = 'L',
ARGP_LOG_FILE_KEY = 'l', ARGP_LOG_FILE_KEY = 'l',
ARGP_VOLFILE_SERVER_PORT_KEY = 131, ARGP_VOLFILE_SERVER_PORT_KEY = 131,
ARGP_VOLFILE_SERVER_TRANSPORT_KEY = 132, ARGP_VOLFILE_SERVER_TRANSPORT_KEY = 132,
ARGP_PID_FILE_KEY = 'p', ARGP_PID_FILE_KEY = 'p',
ARGP_SOCK_FILE_KEY = 'S', ARGP_SOCK_FILE_KEY = 'S',
ARGP_NO_DAEMON_KEY = 'N', ARGP_NO_DAEMON_KEY = 'N',
ARGP_RUN_ID_KEY = 'r', ARGP_RUN_ID_KEY = 'r',
ARGP_DEBUG_KEY = 133, ARGP_DEBUG_KEY = 133,
ARGP_ENTRY_TIMEOUT_KEY = 135, ARGP_ENTRY_TIMEOUT_KEY = 135,
ARGP_ATTRIBUTE_TIMEOUT_KEY = 136, ARGP_ATTRIBUTE_TIMEOUT_KEY = 136,
ARGP_VOLUME_NAME_KEY = 137, ARGP_VOLUME_NAME_KEY = 137,
ARGP_XLATOR_OPTION_KEY = 138, ARGP_XLATOR_OPTION_KEY = 138,
ARGP_DIRECT_IO_MODE_KEY = 139, ARGP_DIRECT_IO_MODE_KEY = 139,
#ifdef GF_DARWIN_HOST_OS #ifdef GF_DARWIN_HOST_OS
ARGP_NON_LOCAL_KEY = 140, ARGP_NON_LOCAL_KEY = 140,
#endif /* DARWIN */ #endif /* DARWIN */
ARGP_VOLFILE_ID_KEY = 143, ARGP_VOLFILE_ID_KEY = 143,
ARGP_VOLFILE_CHECK_KEY = 144, ARGP_VOLFILE_CHECK_KEY = 144,
ARGP_VOLFILE_MAX_FETCH_ATTEMPTS = 145, ARGP_VOLFILE_MAX_FETCH_ATTEMPTS = 145,
ARGP_LOG_SERVER_KEY = 146, ARGP_LOG_SERVER_KEY = 146,