fix some build issues
authorFilippos Giannakos <philipgian@grnet.gr>
Wed, 26 Sep 2012 16:17:15 +0000 (19:17 +0300)
committerFilippos Giannakos <philipgian@grnet.gr>
Wed, 26 Sep 2012 16:17:15 +0000 (19:17 +0300)
xseg/peers/user/mt-mapperd.c
xseg/sys/kernel/_sysutil.h
xseg/sys/kernel/xsegmod.c

index e48dd89..0bd4af8 100644 (file)
@@ -1371,6 +1371,10 @@ static int delete_object(struct peerd *peer, struct peer_req *pr,
        struct mapperd *mapper = __get_mapperd(peer);
        struct mapper_io *mio = __get_mapper_io(pr);
 
        struct mapperd *mapper = __get_mapperd(peer);
        struct mapper_io *mio = __get_mapper_io(pr);
 
+       if (!(mn->flags && MF_OBJECT_EXIST)){
+               //cant delete not existing object
+
+       }
        if (xq_count(&mn->pending) != 0) {
                mio->delobj = mn->objectidx;
                __xq_append_tail(&mn->pending, (xqindex) pr); //FIXME err check
        if (xq_count(&mn->pending) != 0) {
                mio->delobj = mn->objectidx;
                __xq_append_tail(&mn->pending, (xqindex) pr); //FIXME err check
index 7042642..d7b329b 100644 (file)
@@ -6,4 +6,10 @@
 #include <linux/slab.h>
 #include <linux/time.h>
 
 #include <linux/slab.h>
 #include <linux/time.h>
 
+struct log_ctx {
+       void *logfile;
+       char *peer_name;
+       unsigned int log_level; 
+};
+
 #endif
 #endif
index 75a2a55..2c0cabb 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/time.h>
 
 #include <sys/domain.h>
 #include <linux/time.h>
 
 #include <sys/domain.h>
+#include <sys/util.h>
 #include <xtypes/domain.h>
 #include <xseg/domain.h>
 
 #include <xtypes/domain.h>
 #include <xseg/domain.h>
 
@@ -74,13 +75,7 @@ static void __exit xsegmod_exit(void)
        return;
 }
 
        return;
 }
 
-struct log_ctx {
-       void *logfile;
-       char *peer_name;
-       unsigned int log_level; 
-};
-
-int kernel_init_logctx(struct log_ctx *lc, char *peer_name, unsigned int log_level, char *logfile)
+int kernel_init_logctx(struct log_ctx *lc, char *peer_name, enum log_level log_level, char *logfile)
 {
        lc->peer_name = peer_name;
        lc->log_level = log_level;
 {
        lc->peer_name = peer_name;
        lc->log_level = log_level;
@@ -88,13 +83,14 @@ int kernel_init_logctx(struct log_ctx *lc, char *peer_name, unsigned int log_lev
        return 0;
 }
 int (*init_logctx)(struct log_ctx *lc, char *peer_name, enum log_level log_level, char *logfile) = kernel_init_logctx;
        return 0;
 }
 int (*init_logctx)(struct log_ctx *lc, char *peer_name, enum log_level log_level, char *logfile) = kernel_init_logctx;
+EXPORT_SYMBOL(init_logctx);
 
 void __xseg_log2(struct log_ctx *lc, unsigned int level, char *fmt, ...)
 {
        va_list ap;
        struct timeval t;
        struct tm broken;
 
 void __xseg_log2(struct log_ctx *lc, unsigned int level, char *fmt, ...)
 {
        va_list ap;
        struct timeval t;
        struct tm broken;
-       char timebuf[1024], buffer[4096];
+       char buffer[4096];
        char *buf = buffer;
        char *type = NULL, *pn = NULL;
 
        char *buf = buffer;
        char *type = NULL, *pn = NULL;
 
@@ -124,6 +120,7 @@ void __xseg_log2(struct log_ctx *lc, unsigned int level, char *fmt, ...)
 
        return;
 }
 
        return;
 }
+EXPORT_SYMBOL(__xseg_log2);
 
 module_init(xsegmod_init);
 module_exit(xsegmod_exit);
 
 module_init(xsegmod_init);
 module_exit(xsegmod_exit);