summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2011-08-12 09:23:15 +0200
committerAnand Avati <avati@gluster.com>2011-08-12 05:02:58 -0700
commit8a24e3179fc822e3ec59eaac8f6a2050b8dd9b40 (patch)
treed038233db2eb5a688aa5b767a74a7e7225f7492e
parent5b6be1cdb500b375d673d9b2f2dfe7cfbda5d2b8 (diff)
Do not distribute UFS1 extended attribute backing store
Change-Id: Ie05751aa8d96a2f7996843a914e1a66df2777eba BUG: 2923 Reviewed-on: http://review.gluster.com/222 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
-rw-r--r--xlators/storage/posix/src/posix.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index cc337de18bb..dce75e736d8 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3407,6 +3407,20 @@ __posix_fill_readdir (DIR *dir, off_t off, size_t size, gf_dirent_t *entries,
&& (!strcmp (entry->d_name, GF_REPLICATE_TRASH_DIR)))
continue;
+#ifdef __NetBSD__
+ /*
+ * NetBSD with UFS1 backend uses backing files for
+ * extended attributes. They can be found in a
+ * .attribute file located at the root of the filesystem
+ * We hide it to glusterfs clients, since chaos will occur
+ * when the cluster/dht xlator decides to distribute
+ * exended attribute backing file accross storage servers.
+ */
+ if ((!strcmp(real_path, base_path))
+ && (!strcmp(entry->d_name, ".attribute")))
+ continue;
+#endif /* __NetBSD__ */
+
if ((!strcmp (real_path, base_path))
&& (!strncmp (GF_HIDDEN_PATH, entry->d_name,
strlen (GF_HIDDEN_PATH)))) {