From 1e30fc3e001594e9cfd372079adf2172bc9ed3df Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 8 Apr 2010 12:24:31 +0000 Subject: iatt: change S_IF macros with IA_IF macros in missing places Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 730 (unknown filetypes and inode conflicts in afr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=730 --- xlators/cluster/afr/src/afr-self-heal-common.c | 14 ++++++------ xlators/cluster/afr/src/afr-self-heal-entry.c | 30 +++++++++++++------------- xlators/storage/posix/src/posix.c | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index dead7a323ed..5115a7306ee 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1219,17 +1219,17 @@ sh_missing_entries_create (call_frame_t *frame, xlator_t *this) } switch (type) { - case S_IFSOCK: - case S_IFREG: - case S_IFBLK: - case S_IFCHR: - case S_IFIFO: + case IA_IFSOCK: + case IA_IFREG: + case IA_IFBLK: + case IA_IFCHR: + case IA_IFIFO: sh_missing_entries_mknod (frame, this); break; - case S_IFLNK: + case IA_IFLNK: sh_missing_entries_readlink (frame, this); break; - case S_IFDIR: + case IA_IFDIR: sh_missing_entries_mkdir (frame, this); break; default: diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index ef8de198728..4336c7a61f8 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -763,13 +763,13 @@ afr_sh_entry_expunge_remove (call_frame_t *expunge_frame, xlator_t *this, type = buf->ia_type; switch (type) { - case S_IFSOCK: - case S_IFREG: - case S_IFBLK: - case S_IFCHR: - case S_IFIFO: - case S_IFLNK: - case S_IFDIR: + case IA_IFSOCK: + case IA_IFREG: + case IA_IFBLK: + case IA_IFCHR: + case IA_IFIFO: + case IA_IFLNK: + case IA_IFDIR: afr_sh_entry_expunge_lookup_trash (expunge_frame, this, active_src); break; default: @@ -1755,19 +1755,19 @@ afr_sh_entry_impunge_recreate_lookup_cbk (call_frame_t *impunge_frame, type = buf->ia_type; switch (type) { - case S_IFSOCK: - case S_IFREG: - case S_IFBLK: - case S_IFCHR: - case S_IFIFO: + case IA_IFSOCK: + case IA_IFREG: + case IA_IFBLK: + case IA_IFCHR: + case IA_IFIFO: afr_sh_entry_impunge_mknod (impunge_frame, this, child_index, buf); break; - case S_IFLNK: + case IA_IFLNK: afr_sh_entry_impunge_readlink (impunge_frame, this, child_index, buf); break; - case S_IFDIR: + case IA_IFDIR: afr_sh_entry_impunge_mkdir (impunge_frame, this, child_index, buf); break; @@ -1848,7 +1848,7 @@ afr_sh_entry_impunge_entry_cbk (call_frame_t *impunge_frame, void *cookie, active_src = impunge_sh->active_source; if ((op_ret == -1 && op_errno == ENOENT) - || (S_ISLNK (impunge_sh->impunging_entry_mode))) { + || (IA_ISLNK (impunge_sh->impunging_entry_mode))) { /* * A symlink's target might have changed, so diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 56023afb290..832b437b5d5 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -271,7 +271,7 @@ posix_lstat_with_gen (xlator_t *this, const char *path, struct iatt *stbuf_p) } #ifndef GF_LINUX_HOST_OS - if (!S_ISDIR (stbuf.st_mode) && !S_ISREG (stbuf.st_mode)) { + if (stbuf.ia_type != IA_IFDIR && stbuf.ia_type != IA_IFREG) { stbuf.ia_gen = (typeof(stbuf.ia_gen))stbuf.ia_mtime; if (stbuf_p) *stbuf_p = stbuf; @@ -342,7 +342,7 @@ posix_fstat_with_gen (xlator_t *this, int fd, struct iatt *stbuf_p) } #ifndef GF_LINUX_HOST_OS - if (!S_ISDIR (stbuf.st_mode) && !S_ISREG (stbuf.st_mode)) { + if (stbuf.ia_type != IA_IFDIR && stbuf.ia_type != IA_IFREG) { stbuf.ia_gen = (typeof(stbuf.ia_gen))stbuf.ia_mtime; return 0; } -- cgit