[cache_writeback] work in progress
This commit is contained in:
7
block-cache/copier.cc
Normal file
7
block-cache/copier.cc
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "block-cache/copier.h"
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------
|
30
block-cache/copier.h
Normal file
30
block-cache/copier.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef BLOCK_CACHE_COPIER_H
|
||||
#define BLOCK_CACHE_COPIER_H
|
||||
|
||||
#include "block_cache.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace bcache {
|
||||
class copier {
|
||||
public:
|
||||
// block size in sectors
|
||||
copier(std::string const &src, std::string const &dest,
|
||||
unsigned block_size);
|
||||
~copier();
|
||||
|
||||
// Returns the number of sectors copied
|
||||
unsigned copy(block_address from, block_address to);
|
||||
|
||||
unsigned get_block_size() const;
|
||||
|
||||
private:
|
||||
unsigned block_size_;
|
||||
};
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user