Loading fs_mgr/libsnapshot/libsnapshot_cow/writer_base.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -191,5 +191,16 @@ std::unique_ptr<chromeos_update_engine::FileDescriptor> CowWriterBase::OpenFileD block_dev_size); } bool CowWriterBase::Sync() { if (is_dev_null_) { return true; } if (fsync(fd_.get()) < 0) { PLOG(ERROR) << "fsync failed"; return false; } return true; } } // namespace snapshot } // namespace android fs_mgr/libsnapshot/libsnapshot_cow/writer_base.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ class CowWriterBase : public ICowWriter { // If the given label is not found, Initialize will fail. virtual bool Initialize(std::optional<uint64_t> label = {}) = 0; bool Sync(); bool AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override; bool AddRawBlocks(uint64_t new_block_start, const void* data, size_t size) override; bool AddXorBlocks(uint32_t new_block_start, const void* data, size_t size, uint32_t old_block, Loading fs_mgr/libsnapshot/libsnapshot_cow/writer_v2.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -704,17 +704,6 @@ bool CowWriterV2::WriteRawData(const void* data, const size_t size) { return true; } bool CowWriterV2::Sync() { if (is_dev_null_) { return true; } if (fsync(fd_.get()) < 0) { PLOG(ERROR) << "fsync failed"; return false; } return true; } bool CowWriterV2::Truncate(off_t length) { if (is_dev_null_ || is_block_device_) { return true; Loading fs_mgr/libsnapshot/libsnapshot_cow/writer_v2.h +0 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ class CowWriterV2 : public CowWriterBase { bool FlushCluster(); bool CompressBlocks(size_t num_blocks, const void* data); bool Sync(); bool Truncate(off_t length); bool EnsureSpaceAvailable(const uint64_t bytes_needed) const; Loading Loading
fs_mgr/libsnapshot/libsnapshot_cow/writer_base.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -191,5 +191,16 @@ std::unique_ptr<chromeos_update_engine::FileDescriptor> CowWriterBase::OpenFileD block_dev_size); } bool CowWriterBase::Sync() { if (is_dev_null_) { return true; } if (fsync(fd_.get()) < 0) { PLOG(ERROR) << "fsync failed"; return false; } return true; } } // namespace snapshot } // namespace android
fs_mgr/libsnapshot/libsnapshot_cow/writer_base.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ class CowWriterBase : public ICowWriter { // If the given label is not found, Initialize will fail. virtual bool Initialize(std::optional<uint64_t> label = {}) = 0; bool Sync(); bool AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override; bool AddRawBlocks(uint64_t new_block_start, const void* data, size_t size) override; bool AddXorBlocks(uint32_t new_block_start, const void* data, size_t size, uint32_t old_block, Loading
fs_mgr/libsnapshot/libsnapshot_cow/writer_v2.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -704,17 +704,6 @@ bool CowWriterV2::WriteRawData(const void* data, const size_t size) { return true; } bool CowWriterV2::Sync() { if (is_dev_null_) { return true; } if (fsync(fd_.get()) < 0) { PLOG(ERROR) << "fsync failed"; return false; } return true; } bool CowWriterV2::Truncate(off_t length) { if (is_dev_null_ || is_block_device_) { return true; Loading
fs_mgr/libsnapshot/libsnapshot_cow/writer_v2.h +0 −1 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ class CowWriterV2 : public CowWriterBase { bool FlushCluster(); bool CompressBlocks(size_t num_blocks, const void* data); bool Sync(); bool Truncate(off_t length); bool EnsureSpaceAvailable(const uint64_t bytes_needed) const; Loading