diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-11-27 12:46:21 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2013-11-29 11:20:10 +0530 |
commit | 5fb7e741c746bf32162967720daceda04d56f615 (patch) | |
tree | 56b2ade831b775dbd2f3460a707bd19a823e09ee /xlators/mgmt/glusterd/src/glusterd.h | |
parent | fae2c3e27037899198d8e7d83ea6aeb7f45f0ebd (diff) |
mgmt/glusterd: create the pid file for the brick process of the snap volume
Change-Id: I8fafb19c2c13caac2a509c36f99d2dd782865b13
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index bb998cccc..fb4f32a82 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -468,6 +468,16 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args); volpath, brickinfo->hostname, exp_path); \ } while (0) +#define GLUSTERD_GET_SNAP_BRICK_PIDFILE(pidfile,volinfo,snapname,brickinfo, \ + priv) do { \ + char exp_path[PATH_MAX] = {0,}; \ + char volpath[PATH_MAX] = {0,}; \ + GLUSTERD_GET_SNAP_DIR(volpath, volinfo, snapname, priv); \ + GLUSTERD_REMOVE_SLASH_FROM_PATH (brickinfo->path, exp_path); \ + snprintf (pidfile, PATH_MAX, "%s/run/%s-%s.pid", \ + volpath, brickinfo->hostname, exp_path); \ + } while (0) + #define GLUSTERD_GET_NFS_PIDFILE(pidfile,nfspath) { \ snprintf (pidfile, PATH_MAX, "%s/run/nfs.pid", \ nfspath); \ |