summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2014-06-27 11:38:57 +0000
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-06-30 02:27:02 -0700
commita39d94589eb626c28ae9b06bcc898ebf00147a59 (patch)
tree250553179da06a4a447777fbc1423bdb980d825e /xlators/mgmt/glusterd/src/glusterd-snapshot.c
parentd78d53e853e43f78c59202f1c2e761d17dad93c5 (diff)
glusterd/snapshot: Correct the mount path check
Before removing a lvm, we check if the lvm is mounted on the brick path. If not, we remove the brick path only. Correcting this check to support restore cases, where the volname is not the non-hyphanated uuid, but the original volume's name. Change-Id: If158f4651d36efa2f94523458faf826230e9c76a BUG: 1113975 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/8192 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: Justin Clift <justin@gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 3edbd827dcb..3095414b88e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2124,7 +2124,7 @@ glusterd_lvm_snapshot_remove (dict_t *rsp_dict, glusterd_volinfo_t *snap_vol)
continue;
}
- if (!strstr (mnt_pt, snap_vol->volname)) {
+ if (strcmp (mnt_pt, brick_mount_path)) {
gf_log (this->name, GF_LOG_DEBUG,
"Lvm is not mounted for brick %s:%s. "
"Removing the brick path.",