Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb45742b authored by Daniel Zheng's avatar Daniel Zheng
Browse files

Move Cow Header child writer

v2 writer and v3 writer will write different versions of the header.
It's better to have each writer hold it's own header.

Test: th
Change-Id: Ibe310d58b830950ad556aabcd0c1009483fc8d86
parent ed1a7d5f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ class CowWriterBase : public ICowWriter {
    bool ValidateNewBlock(uint64_t new_block);

    CowOptions options_;
    CowHeader header_{};

    android::base::unique_fd fd_;
    bool is_dev_null_ = false;
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ class CowWriterV2 : public CowWriterBase {

  private:
    CowFooter footer_{};
    CowHeader header_{};
    CowCompression compression_;
    // in the case that we are using one thread for compression, we can store and re-use the same
    // compressor