summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-quota.c
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-09-24 15:52:58 -0700
committerHarshavardhana <harsha@harshavardhana.net>2014-09-24 16:23:01 -0700
commitc16408ab40e882f6e4ab41c6acb403717cabd1bc (patch)
treed11cd59fb7dc0e0dfa1fe4ac69345bf17ccae28e /xlators/mgmt/glusterd/src/glusterd-quota.c
parentb097225202629448e3b10dc4160125c376971682 (diff)
downloadglusterfs-c16408ab40e882f6e4ab41c6acb403717cabd1bc.tar.gz
glusterfs-c16408ab40e882f6e4ab41c6acb403717cabd1bc.tar.xz
glusterfs-c16408ab40e882f6e4ab41c6acb403717cabd1bc.zip
OSX/FreeBSD: Regression fix
Introduced in "1f6e992f1aaa676be5bd47d17e58f1171825cf43" Change-Id: I655cf613ca93a749ab5403cb3ec038e739993e2e BUG: 1146279 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8841 Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c')
-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 a6712aa790..857c4643e7 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);