summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c3
2 files changed, 7 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 614d34d..f754b52 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -5779,12 +5779,13 @@ glusterd_get_state(rpcsvc_request_t *req, dict_t *dict)
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_FILE_OP_FAILED,
"statfs error: %s ", strerror(errno));
- goto out;
+ memfree = 0;
+ memtotal = 0;
+ } else {
+ memfree = brickstat.f_bfree * brickstat.f_bsize;
+ memtotal = brickstat.f_blocks * brickstat.f_bsize;
}
- memfree = brickstat.f_bfree * brickstat.f_bsize;
- memtotal = brickstat.f_blocks * brickstat.f_bsize;
-
fprintf(fp, "Volume%d.Brick%d.spacefree: %" PRIu64 "Bytes\n",
count_bkp, count, memfree);
fprintf(fp, "Volume%d.Brick%d.spacetotal: %" PRIu64 "Bytes\n",
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 124ca27..22190ef 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -2878,8 +2878,9 @@ glusterd_store_retrieve_bricks(glusterd_volinfo_t *volinfo)
brickinfo->path);
/* No need for treating it as an error, lets continue
with just a message */
+ } else {
+ brickinfo->statfs_fsid = brickstat.f_fsid;
}
- brickinfo->statfs_fsid = brickstat.f_fsid;
}
cds_list_add_tail(&brickinfo->brick_list, &volinfo->bricks);