From 19e4ef605fe95c08c48bcade95096082a54cdd2d Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 20 Apr 2011 00:59:26 +0000 Subject: glusterd: log the error immedietly after the syscall failure Signed-off-by: Raghavendra Bhat Signed-off-by: Anand Avati BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346 --- xlators/mgmt/glusterd/src/glusterd-store.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 9bbc2e618..4f296c52a 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); -- cgit