Re: [PATCH BUG:361 3/3] OS X: getxattr() takes two additional arguments on Mac OS X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Even here, how about just calling 'sys_getxattr()' instead of getxattr()?

Ref: 'libglusterfs/src/syscall.c'

My apologies, I should have kept in mind about compatibility of posix calls while writing these lines..

Regards,
Amar


On Mon, Sep 27, 2010 at 6:47 PM, Noah Williamsson <noah.williamsson@xxxxxxxxx> wrote:

Signed-off-by: Noah Williamsson <noah.williamsson@xxxxxxxxx>
---
 xlators/mgmt/glusterd/src/glusterd-handler.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 0da46c5..4ac8667 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -730,8 +730,13 @@ glusterd_check_and_rebalance (glusterd_volinfo_t *volinfo, char *dir)

                if (S_ISDIR (stbuf.st_mode)) {
                        /* Fix the layout of the directory */
+#ifdef GF_DARWIN_HOST_OS
+                        getxattr (full_path, "trusted.distribute.fix.layout",
+                                  &value, 128, 0, 0);
+#else
                        getxattr (full_path, "trusted.distribute.fix.layout",
                                  &value, 128);
+#endif
                        continue;
                }
                if (S_ISREG (stbuf.st_mode) && ((stbuf.st_mode & 01000) == 01000)) {
@@ -859,7 +864,12 @@ glusterd_defrag_start (void *data)
        }

        /* Fix the root ('/') first */
+#ifdef GF_DARWIN_HOST_OS
+        getxattr (defrag->mount, "trusted.distribute.fix.layout", &value, 128,
+                  0, 0);
+#else
        getxattr (defrag->mount, "trusted.distribute.fix.layout", &value, 128);
+#endif

        ret = glusterd_check_and_rebalance (volinfo, defrag->mount);

--
1.6.6.1


_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxx
http://lists.nongnu.org/mailman/listinfo/gluster-devel


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux