diff options
Diffstat (limited to 'xlators/cluster/dht/src/switch.c')
| -rw-r--r-- | xlators/cluster/dht/src/switch.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c index 861012247..2717ce975 100644 --- a/xlators/cluster/dht/src/switch.c +++ b/xlators/cluster/dht/src/switch.c @@ -437,7 +437,8 @@ switch_create (call_frame_t *frame, xlator_t *this, avail_subvol = get_switch_matching_subvol (loc->path, conf, subvol); if (dht_is_subvol_filled (this, avail_subvol)) { avail_subvol = - dht_free_disk_available_subvol (this, avail_subvol); + dht_free_disk_available_subvol (this, avail_subvol, + local); } if (subvol != avail_subvol) { @@ -536,7 +537,8 @@ switch_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, avail_subvol = get_switch_matching_subvol (loc->path, conf, subvol); if (dht_is_subvol_filled (this, avail_subvol)) { avail_subvol = - dht_free_disk_available_subvol (this, avail_subvol); + dht_free_disk_available_subvol (this, avail_subvol, + local); } if (avail_subvol != subvol) { @@ -668,6 +670,7 @@ set_switch_pattern (xlator_t *this, dht_conf_t *conf, GF_FREE (dup_str); continue; } + GF_FREE (dup_str); memcpy (switch_opt->path_pattern, pattern, strlen (pattern)); if (childs) { dup_childs = gf_strdup (childs); @@ -724,7 +727,6 @@ set_switch_pattern (xlator_t *this, dht_conf_t *conf, "option in unify volume. Exiting"); goto err; } - GF_FREE (dup_str); /* Link it to the main structure */ if (switch_buf) { |
