summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2010-10-04 02:50:55 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-04 03:59:03 -0700
commit2420fd1f0cc5c357776d3766884b86859f3c3781 (patch)
treee4929f290f26490343e9dc006eff7a3cc555def9 /xlators/mgmt/glusterd/src/glusterd-store.c
parentebc40051898881fa3d49946046448ee34e356338 (diff)
mgmt/glusterd: update volumes on friend update
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index e6aa91b4ff9..ca19057eb46 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -210,11 +210,13 @@ glusterd_store_delete_brick (glusterd_volinfo_t *volinfo,
ret = unlink (brickpath);
- if (ret < 0) {
- gf_log ("", GF_LOG_ERROR, "Unlink failed on %s",
- brickpath);
+ if ((ret < 0) && (errno != ENOENT)) {
+ gf_log ("", GF_LOG_ERROR, "Unlink failed on %s, reason: %s",
+ brickpath, strerror(errno));
ret = -1;
goto out;
+ } else {
+ ret = 0;
}
out:
@@ -256,9 +258,9 @@ glusterd_store_remove_bricks (glusterd_volinfo_t *volinfo)
snprintf (path, sizeof (path), "%s/%s",
brickdir, entry->d_name);
ret = unlink (path);
- if (ret) {
- gf_log ("", GF_LOG_ERROR, "Unable to unlink %s",
- path);
+ if (ret && errno != ENOENT) {
+ gf_log ("", GF_LOG_ERROR, "Unable to unlink %s, "
+ "reason: %s", path, strerror(errno));
}
glusterd_for_each_entry (entry, dir);
}
@@ -1281,6 +1283,8 @@ glusterd_store_delete_peerinfo (glusterd_peerinfo_t *peerinfo)
}
ret = unlink (filepath);
+ if (ret && (errno == ENOENT))
+ ret = 0;
out:
if (peerinfo->shandle)