summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2013-12-04 09:48:10 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2013-12-12 14:58:01 +0530
commit112691a0d5a539b71c642228e197764248174f5d (patch)
treedfeaa7260a3bc437295043f7817ed5ba4a2ee92c /xlators/mgmt/glusterd/src/glusterd-utils.c
parentdbd515195e5177fe34a12102ba2290cfe2bdc388 (diff)
mgmt/glusterd: snapshot related cleanup
Change-Id: I277a70f732666d047ba5dff7a7e6925e0679741b Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 50d6232ef..9492baf3a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4431,6 +4431,10 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
int ret = 0;
glusterd_snap_t *snap = NULL;
glusterd_volinfo_t *snap_volume = NULL;
+ xlator_t *this = NULL;
+
+ this = THIS;
+ GF_ASSERT (this);
list_for_each_entry (volinfo, &conf->volumes, vol_list) {
if (volinfo->status != GLUSTERD_STATUS_STARTED)
@@ -4438,7 +4442,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
if (volinfo->is_snap_volume)
continue;
start_nodesvcs = _gf_true;
- gf_log (THIS->name, GF_LOG_DEBUG, "starting the volume %s",
+ gf_log (this->name, GF_LOG_DEBUG, "starting the volume %s",
volinfo->volname);
list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
glusterd_brick_start (volinfo, brickinfo, _gf_false);
@@ -4450,7 +4454,13 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
continue;
list_for_each_entry (snap, &volinfo->snaps, snap_list) {
snap_volume = snap->snap_volume;
- GF_ASSERT (snap_volume);
+ //GF_ASSERT (snap_volume);
+ if (!snap_volume) {
+ gf_log (this->name, GF_LOG_WARNING, "volinfo "
+ "for the snap %s is NULL",
+ snap->snap_name);
+ continue;
+ }
list_for_each_entry (brickinfo, &snap_volume->bricks,
brick_list) {
glusterd_snap_brick_start (volinfo, snap_volume,