summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-04-20 00:59:26 +0000
committerAnand Avati <avati@gluster.com>2011-04-21 00:39:39 -0700
commit19e4ef605fe95c08c48bcade95096082a54cdd2d (patch)
treed413b090861ee98a21004f2062ca70dfa80c2279 /xlators
parent746aa1faa4d2f3a3186e8f660e6a140457580fb3 (diff)
glusterd: log the error immedietly after the syscall failure
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@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')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 9bbc2e618df..4f296c52a95 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -798,11 +798,13 @@ glusterd_store_delete_volume (glusterd_volinfo_t *volinfo)
else
ret = unlink (path);
+ if (ret)
+ gf_log ("", GF_LOG_INFO, "errno:%d (%s)", errno,
+ strerror (errno));
+
gf_log ("", GF_LOG_INFO, "%s %s",
ret?"Failed to remove":"Removed",
entry->d_name);
- if (ret)
- gf_log ("", GF_LOG_INFO, "errno:%d", errno);
stat_failed:
memset (path, 0, sizeof(path));
glusterd_for_each_entry (entry, dir);