add obj handlers output in xseg reportall
[archipelago] / xseg / peers / user / mt-mapperd.c
index ec8616b..e5021a3 100644 (file)
@@ -3,7 +3,7 @@
 #include <sys/types.h>
 #include <pthread.h>
 #include <xseg/xseg.h>
-#include <speer.h>
+#include <peer.h>
 #include <time.h>
 #include <xtypes/xlock.h>
 #include <xtypes/xhash.h>
@@ -36,8 +36,6 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
 #define MF_OBJECT_DESTROYED    (1 << 5)
 
 #define MF_OBJECT_NOT_READY    (MF_OBJECT_COPYING|MF_OBJECT_WRITING|MF_OBJECT_DELETING)
-extern struct log_ctx lc;
-extern uint32_t ta;
 
 char *magic_string = "This a magic string. Please hash me";
 unsigned char magic_sha256[SHA256_DIGEST_SIZE];        /* sha256 hash value of magic string */
@@ -1332,7 +1330,7 @@ static int req2objs(struct peer_req *pr, struct map *map, int write)
                                                        mio->err = 1;
                                                }
                                                if (mio->err){
-                                                       XSEGLOG2(&lc, I, "Mio-err, pending_copyups: %d", mio->copyups);
+                                                       XSEGLOG2(&lc, E, "Mio-err, pending_copyups: %d", mio->copyups);
                                                        if (!mio->copyups){
                                                                r = -1;
                                                                goto out;
@@ -1657,8 +1655,10 @@ retry_open:
        if (flags & MF_EXCLUSIVE){
                r = open_map(pr, map);
                if (r < 0) {
-                       if (flags & MF_FORCE)
+                       if (flags & MF_FORCE){
+
                                goto retry_open;
+                       }
                } else {
                        opened = 1;
                }
@@ -1697,7 +1697,7 @@ struct map * get_map(struct peer_req *pr, char *name, uint32_t namelen, uint32_t
 
 }
 
-static int map_action(int (action)(struct peer_req *pr, struct map *map), 
+static int map_action(int (action)(struct peer_req *pr, struct map *map),
                struct peer_req *pr, char *name, uint32_t namelen, uint32_t flags)
 {
        //struct peerd *peer = pr->peer;