[Gluster-devel] [PATCH BUG:361 3/3] OS X: getxattr() takes two additional arguments on Mac OS X
Amar Tumballi
amar at gluster.com
Mon Sep 27 14:44:17 UTC 2010
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 at gmail.com> wrote:
>
> Signed-off-by: Noah Williamsson <noah.williamsson at gmail.com>
> ---
> 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 at nongnu.org
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20100927/ee918e1a/attachment-0003.html>
More information about the Gluster-devel
mailing list