summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c10
2 files changed, 13 insertions, 6 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 8b25f3a1525..f7b1f367f97 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -2359,11 +2359,15 @@ glusterfs_rebalance_event_notify (dict_t *dict)
if (dict) {
ret = dict_set_str (dict, "volname", cmd_args->volfile_id);
- if (ret)
+ if (ret) {
gf_log ("", GF_LOG_ERROR, "failed to set volname");
-
+ }
ret = dict_allocate_and_serialize (dict, &req.dict.dict_val,
&req.dict.dict_len);
+ if (ret) {
+ gf_log ("", GF_LOG_ERROR, "failed to serialize dict");
+ }
+
}
ret = mgmt_submit_request (&req, frame, ctx, &clnt_handshake_prog,
@@ -2372,7 +2376,6 @@ glusterfs_rebalance_event_notify (dict_t *dict)
(xdrproc_t)xdr_gf_event_notify_req);
GF_FREE (req.dict.dict_val);
-
return ret;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 33e6dc064bd..3e56eb36508 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1655,9 +1655,13 @@ brick_graph_add_posix (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (ret)
goto out;
- if (quota_enabled || pgfid_feat || trash_enabled)
- xlator_set_option (xl, "update-link-count-parent",
- "on");
+ if (quota_enabled || pgfid_feat || trash_enabled) {
+ ret = xlator_set_option (xl, "update-link-count-parent",
+ "on");
+ if (ret) {
+ goto out;
+ }
+ }
snprintf (tmpstr, sizeof (tmpstr), "%d", brickinfo->fs_share_count);
ret = xlator_set_option (xl, "shared-brick-count", tmpstr);