projects
/
archipelago
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff5b1cb
)
fix bug in cache
author
Giannakos Filippos
<philipgian@cslab.ece.ntua.gr>
Wed, 4 Jan 2012 21:32:31 +0000
(23:32 +0200)
committer
Giannakos Filippos
<philipgian@cslab.ece.ntua.gr>
Wed, 4 Jan 2012 21:32:31 +0000
(23:32 +0200)
xseg/peers/filed.c
patch
|
blob
|
history
diff --git
a/xseg/peers/filed.c
b/xseg/peers/filed.c
index
9a2ad0e
..
9acb6be
100644
(file)
--- a/
xseg/peers/filed.c
+++ b/
xseg/peers/filed.c
@@
-237,7
+237,7
@@
start:
pthread_cond_wait(&cacheEntry->cond, &store->cache_lock);
}
// if successfully opened
- if (fd > 0) {
+ if (cacheEntry->fd > 0) {
fd = store->fdcache[i].fd;
io->fdcacheidx = i;
goto out;
@@
-265,6
+265,7
@@
start:
}
if (store->fdcache[lru].ref){
fd = -1;
+ printf("lru(%ld) ref not 0 (%lu)\n", lru, store->fdcache[lru].ref);
goto out_err_unlock;
}
//make room for new file