diff options
author | Vijaikumar M <vmallika@redhat.com> | 2014-07-31 14:37:19 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-08-03 07:28:52 -0700 |
commit | 8080a5555e7ba17b9e691171259899ca9e390c76 (patch) | |
tree | 9a4973fa268da88cb726017bb24d8ce013494fe4 /xlators/mgmt/glusterd/src/glusterd-handshake.c | |
parent | f3204a06eb8156743110b1613b4b4b63b70572b6 (diff) |
glusterd/snapshot: Inherit the mount options of a original brick
when creating snapshots
When creating a snapshot a LVM is created at the backend and is mounted
under /var/run/gluster/snaps/... However, this mount does not inherit
the mount options for the original brick acting as the parent for the
snap.
If the snap is restored, this could lead to performance degredations,
functional limitations, or in extreme scenarios even potential data
loss.
Change-Id: I67d70fd83430d83dacc5380c6c928e27fb9c9e1b
BUG: 1125180
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8394
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 7d582d443f4..da3a01c99f8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -349,7 +349,6 @@ glusterd_create_missed_snap (glusterd_missed_snap_info *missed_snapinfo, glusterd_snap_op_t *snap_opinfo) { char *device = NULL; - char fstype[NAME_MAX] = ""; glusterd_conf_t *priv = NULL; glusterd_snap_t *snap = NULL; glusterd_volinfo_t *snap_vol = NULL; @@ -435,12 +434,10 @@ glusterd_create_missed_snap (glusterd_missed_snap_info *missed_snapinfo, /* Update the backend file-system type of snap brick in * snap volinfo. */ - ret = glusterd_update_fstype (snap_opinfo->brick_path, brickinfo, - fstype, sizeof(fstype)); + ret = glusterd_update_mntopts (snap_opinfo->brick_path, brickinfo); if (ret) { gf_log (this->name, GF_LOG_ERROR, "Failed to update " - "file-system type for %s brick", - brickinfo->path); + "mount options for %s brick", brickinfo->path); /* We should not fail snapshot operation if we fail to get * the file-system type */ } |