glusterfs
glusterfs copied to clipboard
libglusterfs, glusterd: use host UUID in binary form
Introduce gf_uuid_dup()
and prefer host UUID in binary form,
adjust nearby code. This is mostly intended to avoid redundant
calls to uuid_utoa()
, drop related variables and slightly
reduce the memory footprint. Drop unused glusterd_uuid_str
argument of glusterd_start_gsync()
as well.
Signed-off-by: Dmitry Antipov [email protected] Updates: #1000
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index 9f7038763..45413484a 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -4288,7 +4288,7 @@ gf_set_nofile(rlim_t high, rlim_t low)
{
int n, ret = -1;
struct rlimit lim;
- rlim_t r[2] = { high, low };
+ rlim_t r[2] = {high, low};
for (n = 0; n < 2; n++)
if (r[n] != 0) {
diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h
index de1793732..4881e8c89 100644
--- a/libglusterfs/src/glusterfs/common-utils.h
+++ b/libglusterfs/src/glusterfs/common-utils.h
@@ -209,7 +209,9 @@ gf_set_nofile(rlim_t high, rlim_t low);
#else /* Darwin */
-#define gf_set_nofile(low, high) do { } while (0)
+#define gf_set_nofile(low, high) \
+ do { \
+ } while (0)
#endif /* not GF_DARWIN_HOST_OS */
/run regression
CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format
index 9f7038763..45413484a 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -4288,7 +4288,7 @@ gf_set_nofile(rlim_t high, rlim_t low)
{
int n, ret = -1;
struct rlimit lim;
- rlim_t r[2] = { high, low };
+ rlim_t r[2] = {high, low};
for (n = 0; n < 2; n++)
if (r[n] != 0) {
diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h
index de1793732..4881e8c89 100644
--- a/libglusterfs/src/glusterfs/common-utils.h
+++ b/libglusterfs/src/glusterfs/common-utils.h
@@ -209,7 +209,9 @@ gf_set_nofile(rlim_t high, rlim_t low);
#else /* Darwin */
-#define gf_set_nofile(low, high) do { } while (0)
+#define gf_set_nofile(low, high) \
+ do { \
+ } while (0)
#endif /* not GF_DARWIN_HOST_OS */
/run regression
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.