From c67686ecb988164ad9e7d817c95e8d5d545ccd72 Mon Sep 17 00:00:00 2001 From: Akilesh Kailash Date: Fri, 30 Apr 2021 06:49:29 +0000 Subject: [PATCH 1/2] libsnapshot: Bump up the kCowVersionManifest version kCowVersionManifest will be 2. This should now be in sync with kCowVersionMajor. Bug: 183863613 Test: OTA with new COW format (by enabling scratch space option) Signed-off-by: Akilesh Kailash Change-Id: Ia6c31e399de723ee83459b59d6b076b48f5c88d5 --- fs_mgr/libsnapshot/include/libsnapshot/cow_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h b/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h index c05b7efed..000e5e14b 100644 --- a/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h +++ b/fs_mgr/libsnapshot/include/libsnapshot/cow_format.h @@ -24,7 +24,7 @@ static constexpr uint64_t kCowMagicNumber = 0x436f77634f572121ULL; static constexpr uint32_t kCowVersionMajor = 2; static constexpr uint32_t kCowVersionMinor = 0; -static constexpr uint32_t kCowVersionManifest = 1; +static constexpr uint32_t kCowVersionManifest = 2; static constexpr uint32_t BLOCK_SZ = 4096; static constexpr uint32_t BLOCK_SHIFT = (__builtin_ffs(BLOCK_SZ) - 1); From b2e125cb1a79096b4011f60bdc4c2d4c43dfb024 Mon Sep 17 00:00:00 2001 From: Akilesh Kailash Date: Fri, 30 Apr 2021 06:50:36 +0000 Subject: [PATCH 2/2] libsnapshot: snapuserd: Enable read-ahead functionality This enables read-ahead functionality by having scratch space in the COW Bug: 183863613 Test: OTA tests with new COW format Signed-off-by: Akilesh Kailash Change-Id: I7988687c81d0ea239e71695818199db4653ddb80 --- fs_mgr/libsnapshot/include/libsnapshot/cow_writer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/libsnapshot/include/libsnapshot/cow_writer.h b/fs_mgr/libsnapshot/include/libsnapshot/cow_writer.h index 1192e7d29..f43ea6834 100644 --- a/fs_mgr/libsnapshot/include/libsnapshot/cow_writer.h +++ b/fs_mgr/libsnapshot/include/libsnapshot/cow_writer.h @@ -37,7 +37,7 @@ struct CowOptions { // Number of CowOperations in a cluster. 0 for no clustering. Cannot be 1. uint32_t cluster_ops = 200; - bool scratch_space = false; + bool scratch_space = true; }; // Interface for writing to a snapuserd COW. All operations are ordered; merges