diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 0ea39358404..a4ee2c15006 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -9454,15 +9454,6 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, /* Use the same version as the original version */ new_volinfo->version = orig_vol->version; - /* Initialize the snapd service */ - ret = glusterd_snapdsvc_init (new_volinfo); - if (ret) { - gf_msg (this->name, GF_LOG_ERROR, 0, - GD_MSG_SNAPD_INIT_FAIL, "Failed to initialize snapd " - "service for volume %s", orig_vol->volname); - goto out; - } - /* Copy the snap vol info to the new_volinfo.*/ ret = glusterd_snap_volinfo_restore (dict, rsp_dict, new_volinfo, snap_vol, volcount); @@ -9533,6 +9524,15 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, goto out; } + /* Initialize the snapd service */ + ret = glusterd_snapdsvc_init (new_volinfo); + if (ret) { + gf_msg (this->name, GF_LOG_ERROR, 0, + GD_MSG_SNAPD_INIT_FAIL, "Failed to initialize snapd " + "service for volume %s", orig_vol->volname); + goto out; + } + ret = 0; out: if (ret) { |
