int fd, exist;
if (!replaying) {
- Mutex::Locker l(fdcache_lock);
*outfd = fdcache.lookup(oid);
if (*outfd)
return 0;
}
if (!replaying) {
- Mutex::Locker l(fdcache_lock);
- *outfd = fdcache.lookup(oid);
- if (*outfd) {
- VOID_TEMP_FAILURE_RETRY(::close(fd));
+ bool existed;
+ *outfd = fdcache.add(oid, fd, &existed);
+ if (existed) {
+ TEMP_FAILURE_RETRY(::close(fd));
return 0;
- } else {
- bool existed;
- *outfd = fdcache.add(oid, fd, &existed);
- assert(!existed);
}
} else {
*outfd = FDRef(new FDCache::FD(fd));
int r = get_index(cid, &index);
if (r < 0)
return r;
- Mutex::Locker l(fdcache_lock);
{
IndexedPath path;
int exist;
sync_entry_timeo_lock("sync_entry_timeo_lock"),
timer(g_ceph_context, sync_entry_timeo_lock),
stop(false), sync_thread(this),
- fdcache_lock("fdcache_lock"),
fdcache(g_ceph_context),
wbthrottle(g_ceph_context),
default_osr("default"),