[thin] Add more constructors to device_details

This commit is contained in:
Ming-Hung Tsai 2020-05-29 14:48:10 +08:00
parent dc5bb3559b
commit 5810846409
2 changed files with 8 additions and 0 deletions

View File

@ -54,6 +54,13 @@ namespace thin_provisioning {
snapshotted_time_(0) {
}
device_details::device_details(uint64_t tid, uint32_t time)
: mapped_blocks_(0),
transaction_id_(tid),
creation_time_(time),
snapshotted_time_(time) {
}
void
device_details_traits::unpack(device_details_disk const &disk, device_details &value)
{

View File

@ -17,6 +17,7 @@ namespace thin_provisioning {
struct device_details {
device_details();
device_details(uint64_t tid, uint32_t time);
uint64_t mapped_blocks_;
uint64_t transaction_id_; /* when created */