mirror of
https://github.com/ksherlock/profuse.git
synced 2026-04-21 20:17:36 +00:00
use shared_ptr for device, cache
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@345 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
@@ -9,7 +9,9 @@ namespace Device {
|
||||
|
||||
class ConcreteBlockCache : public BlockCache {
|
||||
public:
|
||||
ConcreteBlockCache(BlockDevice *device, unsigned size = 16);
|
||||
|
||||
static BlockCachePointer Create(BlockDevicePointer device, unsigned size = 16);
|
||||
|
||||
virtual ~ConcreteBlockCache();
|
||||
|
||||
virtual void sync();
|
||||
@@ -21,8 +23,11 @@ public:
|
||||
virtual void markDirty(unsigned block);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
ConcreteBlockCache(BlockDevicePointer device, unsigned size);
|
||||
|
||||
struct Entry {
|
||||
unsigned block;
|
||||
unsigned count;
|
||||
|
||||
Reference in New Issue
Block a user