* FD Cache
*/
class FDCache : public md_config_obs_t {
+public:
/**
* FD
*
}
};
+private:
SharedLRU<hobject_t, FD> registry;
CephContext *cct;
+
public:
FDCache(CephContext *cct) : cct(cct) {
assert(cct);
r = get_index(cid, index);
}
Mutex::Locker l(fdcache_lock);
- *outfd = fdcache.lookup(oid);
+ if (!replaying)
+ *outfd = fdcache.lookup(oid);
if (*outfd) {
return 0;
}
goto fail;
}
}
- *outfd = fdcache.add(oid, fd);
+ if (!replaying)
+ *outfd = fdcache.add(oid, fd);
+ else
+ *outfd = FDRef(new FDCache::FD(fd));
return 0;
fail:
r = bl.length();
// flush?
- wbthrottle.queue_wb(fd, oid, offset, len, replica);
+ if (!replaying)
+ wbthrottle.queue_wb(fd, oid, offset, len, replica);
lfn_close(fd);
out: