X-Git-Url: https://code.grnet.gr/git/archipelago/blobdiff_plain/4fb9bce5d58ccc102c6d0098b5a42b1cef916722..52be4227f2fbd7bf8ea7f686ec31173feeabd1b8:/xseg/peers/user/mt-mapperd.c diff --git a/xseg/peers/user/mt-mapperd.c b/xseg/peers/user/mt-mapperd.c index ec8616b..e5021a3 100644 --- a/xseg/peers/user/mt-mapperd.c +++ b/xseg/peers/user/mt-mapperd.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include @@ -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;