Merge remote-tracking branch 'remotes/github-m-h-tsai/v0.6.2-repairtool' into 2016-02-29-mingus-merge
Conflicts: Makefile.in VERSION thin-provisioning/commands.cc thin-provisioning/commands.h thin-provisioning/thin_delta.cc
This commit is contained in:
@@ -545,7 +545,9 @@ block_cache::get(block_address index, unsigned flags, validator::ptr v)
|
||||
return *b;
|
||||
}
|
||||
|
||||
throw std::runtime_error("couldn't get block");
|
||||
std::ostringstream out;
|
||||
out << "couldn't get block " << index;
|
||||
throw std::runtime_error(out.str());
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -32,12 +32,14 @@ namespace bcache {
|
||||
virtual ~validator() {}
|
||||
|
||||
virtual void check(void const *data, block_address location) const = 0;
|
||||
virtual bool check_raw(void const *data) const = 0;
|
||||
virtual void prepare(void *data, block_address location) const = 0;
|
||||
};
|
||||
|
||||
class noop_validator : public validator {
|
||||
public:
|
||||
void check(void const *data, block_address location) const {}
|
||||
bool check_raw(void const *data) const {return true;}
|
||||
void prepare(void *data, block_address location) const {}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user