Removing compression bit from v3 op

We don't need the compression bit in v3 op since all operations will
have the same compression per COW Device and it will be stored within the COW header.
We can check to see if an operation contains compressioned data by
checking data_length and see if it's less than BLOCK_SZ

Test: 4 critical OTA paths
Change-Id: I3f86756d83bf54bf6efd15d9cb7ac064eefdd949
diff --git a/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h b/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
index 2a2cee2..1c92f91 100644
--- a/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
+++ b/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
@@ -201,14 +201,10 @@
 static constexpr uint8_t kCowReadAheadDone = 2;
 
 static constexpr uint64_t kCowOpSourceInfoDataMask = (1ULL << 48) - 1;
-static constexpr uint64_t kCowOpSourceInfoCompressBit = (1ULL << 63);
 
 static inline uint64_t GetCowOpSourceInfoData(const CowOperation* op) {
     return op->source_info & kCowOpSourceInfoDataMask;
 }
-static inline bool GetCowOpSourceInfoCompression(const CowOperation* op) {
-    return !!(op->source_info & kCowOpSourceInfoCompressBit);
-}
 
 struct CowFooter {
     CowFooterOperation op;
diff --git a/fs_mgr/libsnapshot/libsnapshot_cow/cow_format.cpp b/fs_mgr/libsnapshot/libsnapshot_cow/cow_format.cpp
index 58dca64..5ab4f7a 100644
--- a/fs_mgr/libsnapshot/libsnapshot_cow/cow_format.cpp
+++ b/fs_mgr/libsnapshot/libsnapshot_cow/cow_format.cpp
@@ -83,11 +83,6 @@
     os << "CowOperation(";
     EmitCowTypeString(os, op.type);
     if (op.type == kCowReplaceOp || op.type == kCowXorOp || op.type == kCowSequenceOp) {
-        if (op.source_info & kCowOpSourceInfoCompressBit) {
-            os << ", compressed";
-        } else {
-            os << ", uncompressed";
-        }
         os << ", data_length:" << op.data_length;
     }
     if (op.type != kCowClusterOp && op.type != kCowSequenceOp && op.type != kCowLabelOp) {
diff --git a/fs_mgr/libsnapshot/libsnapshot_cow/cow_reader.cpp b/fs_mgr/libsnapshot/libsnapshot_cow/cow_reader.cpp
index bf50f2f..0285c17 100644
--- a/fs_mgr/libsnapshot/libsnapshot_cow/cow_reader.cpp
+++ b/fs_mgr/libsnapshot/libsnapshot_cow/cow_reader.cpp
@@ -136,7 +136,6 @@
                            << v2_op.compression << ", op: " << v2_op;
                 return false;
             }
-            source_info |= kCowOpSourceInfoCompressBit;
         }
         new_op.source_info = source_info;
     }
diff --git a/fs_mgr/libsnapshot/libsnapshot_cow/test_v2.cpp b/fs_mgr/libsnapshot/libsnapshot_cow/test_v2.cpp
index 8f3f03f..100b137 100644
--- a/fs_mgr/libsnapshot/libsnapshot_cow/test_v2.cpp
+++ b/fs_mgr/libsnapshot/libsnapshot_cow/test_v2.cpp
@@ -143,7 +143,6 @@
     op = iter->Get();
 
     ASSERT_EQ(op->type, kCowReplaceOp);
-    ASSERT_FALSE(GetCowOpSourceInfoCompression(op));
     ASSERT_EQ(op->data_length, 4096);
     ASSERT_EQ(op->new_block, 50);
     ASSERT_TRUE(ReadData(reader, op, sink.data(), sink.size()));
@@ -219,7 +218,6 @@
     op = iter->Get();
 
     ASSERT_EQ(op->type, kCowXorOp);
-    ASSERT_FALSE(GetCowOpSourceInfoCompression(op));
     ASSERT_EQ(op->data_length, 4096);
     ASSERT_EQ(op->new_block, 50);
     ASSERT_EQ(GetCowOpSourceInfoData(op), 98314);  // 4096 * 24 + 10
@@ -276,7 +274,6 @@
     std::string sink(data.size(), '\0');
 
     ASSERT_EQ(op->type, kCowReplaceOp);
-    ASSERT_TRUE(GetCowOpSourceInfoCompression(op));
     ASSERT_EQ(op->data_length, 56);  // compressed!
     ASSERT_EQ(op->new_block, 50);
     ASSERT_TRUE(ReadData(reader, op, sink.data(), sink.size()));
@@ -523,7 +520,6 @@
     std::string sink(data.size(), '\0');
 
     ASSERT_EQ(op->type, kCowReplaceOp);
-    ASSERT_TRUE(GetCowOpSourceInfoCompression(op));
     ASSERT_EQ(op->data_length, 56);  // compressed!
     ASSERT_EQ(op->new_block, 50);
     ASSERT_TRUE(ReadData(reader, op, sink.data(), sink.size()));
@@ -541,7 +537,6 @@
 
     sink = {};
     sink.resize(data2.size(), '\0');
-    ASSERT_TRUE(GetCowOpSourceInfoCompression(op));
     ASSERT_EQ(op->data_length, 41);  // compressed!
     ASSERT_EQ(op->new_block, 51);
     ASSERT_TRUE(ReadData(reader, op, sink.data(), sink.size()));
@@ -586,7 +581,6 @@
 
     auto op = iter->Get();
     ASSERT_EQ(op->type, kCowReplaceOp);
-    ASSERT_TRUE(GetCowOpSourceInfoCompression(op));
     ASSERT_EQ(op->new_block, 51);
     ASSERT_TRUE(ReadData(reader, op, sink.data(), sink.size()));
 }