FreeBSD issue

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

 



Hi, all
I'm try to use glusterfs 2.0.4 on my FreeBSD7.2 box.

In libgrusterfs/src/compat.h:
#ifdef GF_BSD_HOST_OS
....<snip>...
#ifndef ino64_t
#define ino64_t ino_t
#endif
... <snip>...

But on FreeBSD (and other OS which has UFS based FS),
ino_t is unsigned 32bit integer. not unsigned 64bit
integer.
I think this is a big probrem.

And on FreeBSD, sizeof size_t is depend on machine arch.
on amd64(EM64T), it is long uint, but on i386, it is uint.
So I made a tiny patch. it seem work.

But I can not make patch for ino_t probrem.
Does anyone support 32bit ino_t?

Thanks.


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--- libglusterfs/src/logging.h.orig	2009-07-29 10:27:46.000000000 +0900
+++ libglusterfs/src/logging.h	2009-07-29 10:55:22.000000000 +0900
@@ -57,9 +57,19 @@
 #    error '64 bit ino_t is must for GlusterFS to work, Compile with "CFLAGS=-D__DARWIN_64_BIT_INO_T"'
 #  endif /* __DARWIN_64_BIT_INO_T */
 
-#else /* !LINUX && !DARWIN */
+#elif GF_BSD_HOST_OS
+#  include <machine/param.h>
+#  undef ALIGN
+#  ifndef i386_btop   /* amd64 arch */
+#    define GF_PRI_SIZET     "lu"
+#  else
+#    define GF_PRI_SIZET     "u"
+#  endif
+#  define GF_PRI_NLINK     "u"
+
+#else /* !LINUX && !DARWIN && !BSD */
 
-/* BSD and Solaris : Change as per testing there.. */
+/* Solaris : Change as per testing there.. */
 #  define GF_PRI_SIZET     "lu"
 #  define GF_PRI_NLINK     "u"
 

[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