libsnapshot: v3 writer GetCowSize
Cow size should just be wherever the last data position is written. In
v3 we no longer have a footer, so this calculation is simple. This
function is used by cow estimator
Test: cow_api_test
Change-Id: I08204e2d560b120450019a529baa41de9b8e66d5
diff --git a/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp b/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp
index 89fd903..7fe7b41 100644
--- a/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp
+++ b/fs_mgr/libsnapshot/libsnapshot_cow/writer_v3.cpp
@@ -360,9 +360,7 @@
}
uint64_t CowWriterV3::GetCowSize() {
- LOG(ERROR) << __LINE__ << " " << __FILE__
- << " <- Get Cow Size function here should never be called";
- return 0;
+ return next_data_pos_;
}
} // namespace snapshot