summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorVijaikumar M <vmallika@redhat.com>2014-05-05 12:43:26 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-05-08 22:24:27 -0700
commit5dda1d4e00b8235656b7e4e8de35f599bf033148 (patch)
treec414a4c4bf22ae61a672025ac01cb8c0812920d6 /xlators/mgmt/glusterd/src/glusterd-store.c
parent065b91b4993f1ab0abc8b1db4d5745a6b58545b0 (diff)
glusterd/snapshot: Execute lvm snapshots in parallel
Back-end LVM Snapshot is executed parallely as synop task This helps is gaining performance when there are more bricks in a node. This patch also removes unwanted logs printed in snapshot cleanup Change-Id: I3174cb4547ebb670eca37a98eb9d75ecb0672a90 BUG: 1061685 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/7461 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 5b1d80e84aa..ca6d9454826 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -2897,9 +2897,10 @@ out:
int32_t
glusterd_mount_brick_paths (char *brick_mount_path, char *device_path)
{
- FILE *mtab = NULL;
int32_t ret = -1;
runner_t runner = {0, };
+ char buff [PATH_MAX] = {0, };
+ struct mntent save_entry = {0, };
struct mntent *entry = NULL;
xlator_t *this = NULL;
glusterd_conf_t *priv = NULL;
@@ -2913,7 +2914,8 @@ glusterd_mount_brick_paths (char *brick_mount_path, char *device_path)
GF_ASSERT (priv);
/* Check if the brick_mount_path is already mounted */
- entry = glusterd_get_mnt_entry_info (brick_mount_path, mtab);
+ entry = glusterd_get_mnt_entry_info (brick_mount_path, buff,
+ sizeof (buff), &save_entry);
if (entry) {
gf_log (this->name, GF_LOG_INFO,
"brick_mount_path (%s) already mounted.",
@@ -2949,8 +2951,6 @@ glusterd_mount_brick_paths (char *brick_mount_path, char *device_path)
}
out:
- if (mtab)
- endmntent (mtab);
gf_log (this->name, GF_LOG_TRACE, "Returning with %d", ret);
return ret;
}