diff options
| -rw-r--r-- | libglusterfs/src/common-utils.c | 4 | ||||
| -rw-r--r-- | libglusterfs/src/common-utils.h | 2 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-hooks.c | 4 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-quota.c | 4 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 18 | 
5 files changed, 16 insertions, 16 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index ec1d5c4823c..e855f04a443 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -4364,7 +4364,7 @@ recursive_rmdir (const char *delete_path)                  goto out;          } -        GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          while (entry) {                  snprintf (path, PATH_MAX, "%s/%s", delete_path, entry->d_name);                  ret = sys_lstat (path, &st); @@ -4387,7 +4387,7 @@ recursive_rmdir (const char *delete_path)                  gf_msg_debug (this->name, 0, "%s %s", ret ?                                "Failed to remove" : "Removed", entry->d_name); -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          }          ret = sys_closedir (dir); diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index bfb36dfa83d..799a356d8a5 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -444,7 +444,7 @@ union gf_sock_union {  #define IOV_MIN(n) min(IOV_MAX,n) -#define GF_FOR_EACH_ENTRY_IN_DIR(entry, dir, scr) \ +#define GF_SKIP_IRRELEVANT_ENTRIES(entry, dir, scr) \          do {\                  entry = NULL;\                  if (dir) { \ diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c index 7519ca2faae..fa88b667c14 100644 --- a/xlators/mgmt/glusterd/src/glusterd-hooks.c +++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c @@ -361,7 +361,7 @@ glusterd_hooks_run_hooks (char *hooks_path, glusterd_op_t op, dict_t *op_ctx,          ret = -1;          line_count = 0; -        GF_FOR_EACH_ENTRY_IN_DIR (entry, hookdir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, hookdir, scratch);          while (entry) {                  if (line_count == N-1) {                          N *= 2; @@ -375,7 +375,7 @@ glusterd_hooks_run_hooks (char *hooks_path, glusterd_op_t op, dict_t *op_ctx,                          line_count++;                  } -                GF_FOR_EACH_ENTRY_IN_DIR (entry, hookdir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, hookdir, scratch);          }          lines[line_count] = NULL; diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c index fc34042a8a7..2c21a469820 100644 --- a/xlators/mgmt/glusterd/src/glusterd-quota.c +++ b/xlators/mgmt/glusterd/src/glusterd-quota.c @@ -409,7 +409,7 @@ glusterd_stop_all_quota_crawl_service (glusterd_conf_t *priv,          if (dir == NULL)                  return; -        GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          while (entry) {                  snprintf (pidfile, sizeof (pidfile), "%s/%s",                            pid_dir, entry->d_name); @@ -418,7 +418,7 @@ glusterd_stop_all_quota_crawl_service (glusterd_conf_t *priv,                                                _gf_true);                  sys_unlink (pidfile); -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          }          sys_closedir (dir);  } diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 4b80186fb70..ea73a1f6d6b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -661,7 +661,7 @@ glusterd_store_remove_bricks (glusterd_volinfo_t *volinfo, char *delete_path)          dir = sys_opendir (brickdir); -        GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          while (entry) {                  snprintf (path, sizeof (path), "%s/%s", @@ -671,7 +671,7 @@ glusterd_store_remove_bricks (glusterd_volinfo_t *volinfo, char *delete_path)                          gf_msg_debug (this->name, 0, "Unable to unlink %s",                                        path);                  } -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          }          sys_closedir (dir); @@ -1924,7 +1924,7 @@ glusterd_store_delete_snap (glusterd_snap_t *snap)                  goto out;          } -        GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          while (entry) {                  snprintf (path, PATH_MAX, "%s/%s", delete_path, entry->d_name);                  ret = sys_stat (path, &st); @@ -1949,7 +1949,7 @@ glusterd_store_delete_snap (glusterd_snap_t *snap)                                  entry->d_name);  stat_failed:                  memset (path, 0, sizeof(path)); -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          }          ret = sys_closedir (dir); @@ -3293,7 +3293,7 @@ glusterd_store_retrieve_volumes (xlator_t  *this, glusterd_snap_t *snap)                  goto out;          } -        GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          while (entry) {                  if (snap && ((!strcmp (entry->d_name, "geo-replication")) || @@ -3337,7 +3337,7 @@ glusterd_store_retrieve_volumes (xlator_t  *this, glusterd_snap_t *snap)                  }  next: -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          }          ret = 0; @@ -3880,7 +3880,7 @@ glusterd_store_retrieve_snaps (xlator_t  *this)                  goto out;          } -        GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +        GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          while (entry) {                  if (strcmp (entry->d_name, GLUSTERD_MISSED_SNAPS_LIST_FILE)) { @@ -3893,7 +3893,7 @@ glusterd_store_retrieve_snaps (xlator_t  *this)                                  goto out;                          }                  } -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);          }          /* Retrieve missed_snaps_list */ @@ -4322,7 +4322,7 @@ glusterd_store_retrieve_peers (xlator_t *this)          }          for (;;) { -                GF_FOR_EACH_ENTRY_IN_DIR (entry, dir, scratch); +                GF_SKIP_IRRELEVANT_ENTRIES (entry, dir, scratch);                  if (!entry) {                          break;                  }  | 
