summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-09-24 15:52:58 -0700
committerHarshavardhana <harsha@harshavardhana.net>2014-09-24 16:34:05 -0700
commitaca91b8d8d48b46c8b0b0eca531614deec28b627 (patch)
tree295ed153c7d2e3fd3a4d992895284a804c0eb220 /xlators/mgmt
parentdd80d06145a5911e697b724a44fd4d858e3a9134 (diff)
OSX/FreeBSD: Regression fix
Introduced in "1f6e992f1aaa676be5bd47d17e58f1171825cf43" Change-Id: Id684e2f082def7d01ef3c258ea6598da6205591f BUG: 1117822 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8840 Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index a6712aa7900..857c4643e75 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -35,9 +35,6 @@
# ifdef __NetBSD__
# define _PATH_SETFATTR "/usr/pkg/bin/setfattr"
# endif
-# ifdef __FreeBSD__
-# define _PATH_SETFATTR "/usr/local/bin/setfattr"
-# endif
#endif
/* Any negative pid to make it special client */
@@ -232,12 +229,27 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname,
runner_add_args (&runner, "/usr/bin/find", "find", ".",
NULL);
- else if (type == GF_QUOTA_OPTION_TYPE_DISABLE)
+ else if (type == GF_QUOTA_OPTION_TYPE_DISABLE) {
+#if defined(GF_DARWIN_HOST_OS)
+ runner_add_args (&runner, "/usr/bin/find", ".",
+ "-exec", "/usr/bin/xattr", "-w",
+ VIRTUAL_QUOTA_XATTR_CLEANUP_KEY, "1",
+ "{}", "\\", ";", NULL);
+#elif defined(__FreeBSD__)
+ runner_add_args (&runner, "/usr/bin/find", ".",
+ "-exec", "/usr/sbin/setextattr",
+ EXTATTR_NAMESPACE_USER,
+ VIRTUAL_QUOTA_XATTR_CLEANUP_KEY, "1",
+ "{}", "\\", ";", NULL);
+#else
runner_add_args (&runner, "/usr/bin/find", ".",
"-exec", _PATH_SETFATTR, "-n",
VIRTUAL_QUOTA_XATTR_CLEANUP_KEY, "-v",
"1", "{}", "\\", ";", NULL);
+#endif
+
+ }
if (runner_start (&runner) == -1)
_exit (EXIT_FAILURE);