From 8a24e3179fc822e3ec59eaac8f6a2050b8dd9b40 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 12 Aug 2011 09:23:15 +0200 Subject: 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 Reviewed-by: Anand Avati --- xlators/storage/posix/src/posix.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index cc337de18..dce75e736 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)))) { -- cgit