[Gluster-devel] NetBSD support, FUSE
Emmanuel Dreyfus
manu at netbsd.org
Fri Jul 23 11:59:22 UTC 2010
Hello
I gave a try to glusterfs on NetBSD. That produced a few patches (see below),
and the server seems fine. The client is another story, though.
NetBSD has a library-level FUSE API, but not a kernel-level API. The library
remaps FUSE to NetBSD's native FUSE equivalent (PUFFS).
After a tour in the code, it seems glusterfs just open /dev/fuse and work on
that, so it will not work. Anyone can confirm there is no support for
library-level FUSE?
The patches:
1) The == operator exists only in bash. POSIX compliance require = instead:
--- xlators/mount/fuse/utils/mount_glusterfs.in.orig
+++ xlators/mount/fuse/utils/mount_glusterfs.in
@@ -166,9 +166,9 @@
}
# TODO: use getopt. This is very much darwin specific
volfile_loc="$1";
- while [ "$volfile_loc" == "-o" ] ; do
+ while [ "$volfile_loc" = "-o" ] ; do
shift ;
shift ;
volfile_loc="$1";
done
2) NetBSD does not have AI_ADDRCONFIG
--- libglusterfs/src/common-utils.c.orig
+++ libglusterfs/src/common-utils.c
@@ -45,8 +45,12 @@
#include "revision.h"
#include "glusterfs.h"
#include "stack.h"
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif /* AI_ADDRCONFIG */
+
typedef int32_t (*rw_op_t)(int32_t fd, char *buf, int32_t size);
typedef int32_t (*rwv_op_t)(int32_t fd, const struct iovec *buf, int32_t size);
static glusterfs_ctx_t *gf_global_ctx;
--- transport/socket/src/name.c.orig
+++ transport/socket/src/name.c
#ifndef AF_INET_SDP
#define AF_INET_SDP 27
#endif
+#ifndef AI_ADDRCONFIG
+#define AI_ADDRCONFIG 0
+#endif /* AI_ADDRCONFIG */
+
static int gf_name_addr_enotspec_log;
#include "transport.h"
#include "socket.h"
3) I don't recall exactly why, but theses twp were required to build
--- xlators/protocol/server/src/server-resolve.c.orig
+++ xlators/protocol/server/src/server-resolve.c
@@ -23,9 +23,9 @@
#endif
#include "server-protocol.h"
#include "server-helpers.h"
-
+#include "compat-errno.h"
int
server_resolve_all (call_frame_t *frame);
int
--- transport/socket/src/socket.c.orig
+++ transport/socket/src/socket.c
@@ -258,9 +258,9 @@
if (keepalive_intvl == GF_USE_DEFAULT_KEEPALIVE)
goto done;
-#ifndef GF_LINUX_HOST_OS
+#if !defined(GF_LINUX_HOST_OS) && !defined(__NetBSD__)
ret = setsockopt (fd, IPPROTO_TCP, TCP_KEEPALIVE, &keepalive_intvl,
sizeof (keepalive_intvl));
if (ret == -1)
goto err;
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org
More information about the Gluster-devel
mailing list