| Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 2010 The Android Open Source Project | 
|  | 3 | // | 
|  | 4 | // Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | // you may not use this file except in compliance with the License. | 
|  | 6 | // You may obtain a copy of the License at | 
|  | 7 | // | 
|  | 8 | //      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | // | 
|  | 10 | // Unless required by applicable law or agreed to in writing, software | 
|  | 11 | // distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | // See the License for the specific language governing permissions and | 
|  | 14 | // limitations under the License. | 
|  | 15 | // | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 16 |  | 
| Alex Deymo | 1beda78 | 2015-06-07 23:01:25 +0200 | [diff] [blame] | 17 | #include "update_engine/payload_generator/extent_ranges.h" | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 18 |  | 
| Alex Vakulenko | d2779df | 2014-06-16 13:19:00 -0700 | [diff] [blame] | 19 | #include <algorithm> | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 20 | #include <set> | 
|  | 21 | #include <utility> | 
|  | 22 | #include <vector> | 
|  | 23 |  | 
|  | 24 | #include <base/logging.h> | 
|  | 25 |  | 
| Amin Hassani | d8b67f4 | 2017-12-06 13:47:52 -0800 | [diff] [blame] | 26 | #include "update_engine/common/utils.h" | 
| Alex Deymo | 39910dc | 2015-11-09 17:04:30 -0800 | [diff] [blame] | 27 | #include "update_engine/payload_consumer/payload_constants.h" | 
| Rahul Chaudhry | efbeecf | 2016-11-15 15:46:55 -0800 | [diff] [blame] | 28 | #include "update_engine/payload_generator/extent_utils.h" | 
| Alex Deymo | 161c4a1 | 2014-05-16 15:56:21 -0700 | [diff] [blame] | 29 |  | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 30 | using std::set; | 
|  | 31 | using std::vector; | 
|  | 32 |  | 
|  | 33 | namespace chromeos_update_engine { | 
|  | 34 |  | 
|  | 35 | bool ExtentRanges::ExtentsOverlapOrTouch(const Extent& a, const Extent& b) { | 
|  | 36 | if (a.start_block() == b.start_block()) | 
|  | 37 | return true; | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 38 | if (a.start_block() == kSparseHole || b.start_block() == kSparseHole) | 
|  | 39 | return false; | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 40 | if (a.start_block() < b.start_block()) { | 
|  | 41 | return a.start_block() + a.num_blocks() >= b.start_block(); | 
|  | 42 | } else { | 
|  | 43 | return b.start_block() + b.num_blocks() >= a.start_block(); | 
|  | 44 | } | 
|  | 45 | } | 
|  | 46 |  | 
|  | 47 | bool ExtentRanges::ExtentsOverlap(const Extent& a, const Extent& b) { | 
|  | 48 | if (a.start_block() == b.start_block()) | 
|  | 49 | return true; | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 50 | if (a.start_block() == kSparseHole || b.start_block() == kSparseHole) | 
|  | 51 | return false; | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 52 | if (a.start_block() < b.start_block()) { | 
|  | 53 | return a.start_block() + a.num_blocks() > b.start_block(); | 
|  | 54 | } else { | 
|  | 55 | return b.start_block() + b.num_blocks() > a.start_block(); | 
|  | 56 | } | 
|  | 57 | } | 
|  | 58 |  | 
|  | 59 | void ExtentRanges::AddBlock(uint64_t block) { | 
|  | 60 | AddExtent(ExtentForRange(block, 1)); | 
|  | 61 | } | 
|  | 62 |  | 
|  | 63 | void ExtentRanges::SubtractBlock(uint64_t block) { | 
|  | 64 | SubtractExtent(ExtentForRange(block, 1)); | 
|  | 65 | } | 
|  | 66 |  | 
|  | 67 | namespace { | 
|  | 68 |  | 
|  | 69 | Extent UnionOverlappingExtents(const Extent& first, const Extent& second) { | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 70 | CHECK_NE(kSparseHole, first.start_block()); | 
|  | 71 | CHECK_NE(kSparseHole, second.start_block()); | 
| Alex Deymo | f329b93 | 2014-10-30 01:37:48 -0700 | [diff] [blame] | 72 | uint64_t start = std::min(first.start_block(), second.start_block()); | 
|  | 73 | uint64_t end = std::max(first.start_block() + first.num_blocks(), | 
|  | 74 | second.start_block() + second.num_blocks()); | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 75 | return ExtentForRange(start, end - start); | 
|  | 76 | } | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 77 |  | 
| Alex Vakulenko | d2779df | 2014-06-16 13:19:00 -0700 | [diff] [blame] | 78 | }  // namespace | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 79 |  | 
|  | 80 | void ExtentRanges::AddExtent(Extent extent) { | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 81 | if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 82 | return; | 
|  | 83 |  | 
|  | 84 | ExtentSet::iterator begin_del = extent_set_.end(); | 
|  | 85 | ExtentSet::iterator end_del = extent_set_.end(); | 
|  | 86 | uint64_t del_blocks = 0; | 
|  | 87 | for (ExtentSet::iterator it = extent_set_.begin(), e = extent_set_.end(); | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 88 | it != e; | 
|  | 89 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 90 | if (ExtentsOverlapOrTouch(*it, extent)) { | 
|  | 91 | end_del = it; | 
|  | 92 | ++end_del; | 
|  | 93 | del_blocks += it->num_blocks(); | 
|  | 94 | if (begin_del == extent_set_.end()) | 
|  | 95 | begin_del = it; | 
|  | 96 |  | 
|  | 97 | extent = UnionOverlappingExtents(extent, *it); | 
|  | 98 | } | 
|  | 99 | } | 
|  | 100 | extent_set_.erase(begin_del, end_del); | 
|  | 101 | extent_set_.insert(extent); | 
|  | 102 | blocks_ -= del_blocks; | 
|  | 103 | blocks_ += extent.num_blocks(); | 
|  | 104 | } | 
|  | 105 |  | 
|  | 106 | namespace { | 
|  | 107 | // Returns base - subtractee (set subtraction). | 
|  | 108 | ExtentRanges::ExtentSet SubtractOverlappingExtents(const Extent& base, | 
|  | 109 | const Extent& subtractee) { | 
|  | 110 | ExtentRanges::ExtentSet ret; | 
|  | 111 | if (subtractee.start_block() > base.start_block()) { | 
|  | 112 | ret.insert(ExtentForRange(base.start_block(), | 
|  | 113 | subtractee.start_block() - base.start_block())); | 
|  | 114 | } | 
|  | 115 | uint64_t base_end = base.start_block() + base.num_blocks(); | 
|  | 116 | uint64_t subtractee_end = subtractee.start_block() + subtractee.num_blocks(); | 
|  | 117 | if (base_end > subtractee_end) { | 
|  | 118 | ret.insert(ExtentForRange(subtractee_end, base_end - subtractee_end)); | 
|  | 119 | } | 
|  | 120 | return ret; | 
|  | 121 | } | 
| Alex Vakulenko | d2779df | 2014-06-16 13:19:00 -0700 | [diff] [blame] | 122 | }  // namespace | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 123 |  | 
|  | 124 | void ExtentRanges::SubtractExtent(const Extent& extent) { | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 125 | if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 126 | return; | 
|  | 127 |  | 
|  | 128 | ExtentSet::iterator begin_del = extent_set_.end(); | 
|  | 129 | ExtentSet::iterator end_del = extent_set_.end(); | 
|  | 130 | uint64_t del_blocks = 0; | 
|  | 131 | ExtentSet new_extents; | 
|  | 132 | for (ExtentSet::iterator it = extent_set_.begin(), e = extent_set_.end(); | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 133 | it != e; | 
|  | 134 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 135 | if (!ExtentsOverlap(*it, extent)) | 
|  | 136 | continue; | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 137 |  | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 138 | if (begin_del == extent_set_.end()) | 
|  | 139 | begin_del = it; | 
|  | 140 | end_del = it; | 
|  | 141 | ++end_del; | 
| Darin Petkov | 94817cb | 2013-05-08 14:33:24 +0200 | [diff] [blame] | 142 |  | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 143 | del_blocks += it->num_blocks(); | 
|  | 144 |  | 
|  | 145 | ExtentSet subtraction = SubtractOverlappingExtents(*it, extent); | 
|  | 146 | for (ExtentSet::iterator jt = subtraction.begin(), je = subtraction.end(); | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 147 | jt != je; | 
|  | 148 | ++jt) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 149 | new_extents.insert(*jt); | 
|  | 150 | del_blocks -= jt->num_blocks(); | 
|  | 151 | } | 
|  | 152 | } | 
|  | 153 | extent_set_.erase(begin_del, end_del); | 
|  | 154 | extent_set_.insert(new_extents.begin(), new_extents.end()); | 
|  | 155 | blocks_ -= del_blocks; | 
|  | 156 | } | 
|  | 157 |  | 
|  | 158 | void ExtentRanges::AddRanges(const ExtentRanges& ranges) { | 
|  | 159 | for (ExtentSet::const_iterator it = ranges.extent_set_.begin(), | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 160 | e = ranges.extent_set_.end(); | 
|  | 161 | it != e; | 
|  | 162 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 163 | AddExtent(*it); | 
|  | 164 | } | 
|  | 165 | } | 
|  | 166 |  | 
|  | 167 | void ExtentRanges::SubtractRanges(const ExtentRanges& ranges) { | 
|  | 168 | for (ExtentSet::const_iterator it = ranges.extent_set_.begin(), | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 169 | e = ranges.extent_set_.end(); | 
|  | 170 | it != e; | 
|  | 171 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 172 | SubtractExtent(*it); | 
|  | 173 | } | 
|  | 174 | } | 
|  | 175 |  | 
|  | 176 | void ExtentRanges::AddExtents(const vector<Extent>& extents) { | 
|  | 177 | for (vector<Extent>::const_iterator it = extents.begin(), e = extents.end(); | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 178 | it != e; | 
|  | 179 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 180 | AddExtent(*it); | 
|  | 181 | } | 
|  | 182 | } | 
|  | 183 |  | 
|  | 184 | void ExtentRanges::SubtractExtents(const vector<Extent>& extents) { | 
|  | 185 | for (vector<Extent>::const_iterator it = extents.begin(), e = extents.end(); | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 186 | it != e; | 
|  | 187 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 188 | SubtractExtent(*it); | 
|  | 189 | } | 
|  | 190 | } | 
|  | 191 |  | 
|  | 192 | void ExtentRanges::AddRepeatedExtents( | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 193 | const ::google::protobuf::RepeatedPtrField<Extent>& exts) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 194 | for (int i = 0, e = exts.size(); i != e; ++i) { | 
|  | 195 | AddExtent(exts.Get(i)); | 
|  | 196 | } | 
|  | 197 | } | 
|  | 198 |  | 
|  | 199 | void ExtentRanges::SubtractRepeatedExtents( | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 200 | const ::google::protobuf::RepeatedPtrField<Extent>& exts) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 201 | for (int i = 0, e = exts.size(); i != e; ++i) { | 
|  | 202 | SubtractExtent(exts.Get(i)); | 
|  | 203 | } | 
|  | 204 | } | 
|  | 205 |  | 
| Alex Deymo | f006135 | 2015-07-01 14:59:15 -0700 | [diff] [blame] | 206 | bool ExtentRanges::ContainsBlock(uint64_t block) const { | 
|  | 207 | auto lower = extent_set_.lower_bound(ExtentForRange(block, 1)); | 
|  | 208 | // The block could be on the extent before the one in |lower|. | 
|  | 209 | if (lower != extent_set_.begin()) | 
|  | 210 | lower--; | 
|  | 211 | // Any extent starting at block+1 or later is not interesting, so this is the | 
|  | 212 | // upper limit. | 
|  | 213 | auto upper = extent_set_.lower_bound(ExtentForRange(block + 1, 0)); | 
|  | 214 | for (auto iter = lower; iter != upper; ++iter) { | 
|  | 215 | if (iter->start_block() <= block && | 
|  | 216 | block < iter->start_block() + iter->num_blocks()) { | 
|  | 217 | return true; | 
|  | 218 | } | 
|  | 219 | } | 
|  | 220 | return false; | 
|  | 221 | } | 
|  | 222 |  | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 223 | void ExtentRanges::Dump() const { | 
|  | 224 | LOG(INFO) << "ExtentRanges Dump. blocks: " << blocks_; | 
|  | 225 | for (ExtentSet::const_iterator it = extent_set_.begin(), | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 226 | e = extent_set_.end(); | 
|  | 227 | it != e; | 
|  | 228 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 229 | LOG(INFO) << "{" << it->start_block() << ", " << it->num_blocks() << "}"; | 
|  | 230 | } | 
|  | 231 | } | 
|  | 232 |  | 
|  | 233 | Extent ExtentForRange(uint64_t start_block, uint64_t num_blocks) { | 
|  | 234 | Extent ret; | 
|  | 235 | ret.set_start_block(start_block); | 
|  | 236 | ret.set_num_blocks(num_blocks); | 
|  | 237 | return ret; | 
|  | 238 | } | 
|  | 239 |  | 
| Sen Jiang | 0a582fb | 2018-06-26 19:27:21 -0700 | [diff] [blame] | 240 | Extent ExtentForBytes(uint64_t block_size, | 
|  | 241 | uint64_t start_bytes, | 
|  | 242 | uint64_t size_bytes) { | 
|  | 243 | uint64_t start_block = start_bytes / block_size; | 
|  | 244 | uint64_t end_block = utils::DivRoundUp(start_bytes + size_bytes, block_size); | 
|  | 245 | return ExtentForRange(start_block, end_block - start_block); | 
|  | 246 | } | 
|  | 247 |  | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 248 | vector<Extent> ExtentRanges::GetExtentsForBlockCount(uint64_t count) const { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 249 | vector<Extent> out; | 
|  | 250 | if (count == 0) | 
|  | 251 | return out; | 
|  | 252 | uint64_t out_blocks = 0; | 
|  | 253 | CHECK(count <= blocks_); | 
|  | 254 | for (ExtentSet::const_iterator it = extent_set_.begin(), | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 255 | e = extent_set_.end(); | 
|  | 256 | it != e; | 
|  | 257 | ++it) { | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 258 | const uint64_t blocks_needed = count - out_blocks; | 
|  | 259 | const Extent& extent = *it; | 
|  | 260 | out.push_back(extent); | 
|  | 261 | out_blocks += extent.num_blocks(); | 
|  | 262 | if (extent.num_blocks() < blocks_needed) | 
|  | 263 | continue; | 
|  | 264 | if (extent.num_blocks() == blocks_needed) | 
|  | 265 | break; | 
|  | 266 | // If we get here, we just added the last extent needed, but it's too big | 
|  | 267 | out_blocks -= extent.num_blocks(); | 
|  | 268 | out_blocks += blocks_needed; | 
|  | 269 | out.back().set_num_blocks(blocks_needed); | 
|  | 270 | break; | 
|  | 271 | } | 
| Amin Hassani | d8b67f4 | 2017-12-06 13:47:52 -0800 | [diff] [blame] | 272 | CHECK(out_blocks == utils::BlocksInExtents(out)); | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 273 | return out; | 
|  | 274 | } | 
|  | 275 |  | 
| Alex Deymo | f006135 | 2015-07-01 14:59:15 -0700 | [diff] [blame] | 276 | vector<Extent> FilterExtentRanges(const vector<Extent>& extents, | 
| Alex Deymo | a376a6e | 2015-06-05 00:31:34 +0200 | [diff] [blame] | 277 | const ExtentRanges& ranges) { | 
|  | 278 | vector<Extent> result; | 
|  | 279 | const ExtentRanges::ExtentSet& extent_set = ranges.extent_set(); | 
|  | 280 | for (Extent extent : extents) { | 
|  | 281 | // The extents are sorted by the start_block. We want to iterate all the | 
|  | 282 | // Extents in the ExtentSet possibly overlapping the current |extent|. This | 
|  | 283 | // is achieved by looking from the extent whose start_block is *lower* than | 
|  | 284 | // the extent.start_block() up to the greatest extent whose start_block is | 
|  | 285 | // lower than extent.start_block() + extent.num_blocks(). | 
|  | 286 | auto lower = extent_set.lower_bound(extent); | 
|  | 287 | // We need to decrement the lower_bound to look at the extent that could | 
|  | 288 | // overlap the beginning of the current |extent|. | 
|  | 289 | if (lower != extent_set.begin()) | 
|  | 290 | lower--; | 
|  | 291 | auto upper = extent_set.lower_bound( | 
|  | 292 | ExtentForRange(extent.start_block() + extent.num_blocks(), 0)); | 
|  | 293 | for (auto iter = lower; iter != upper; ++iter) { | 
|  | 294 | if (!ExtentRanges::ExtentsOverlap(extent, *iter)) | 
|  | 295 | continue; | 
|  | 296 | if (iter->start_block() <= extent.start_block()) { | 
|  | 297 | // We need to cut blocks from the beginning of the |extent|. | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 298 | uint64_t cut_blocks = | 
|  | 299 | iter->start_block() + iter->num_blocks() - extent.start_block(); | 
| Alex Deymo | a376a6e | 2015-06-05 00:31:34 +0200 | [diff] [blame] | 300 | if (cut_blocks >= extent.num_blocks()) { | 
|  | 301 | extent.set_num_blocks(0); | 
|  | 302 | break; | 
|  | 303 | } | 
|  | 304 | extent = ExtentForRange(extent.start_block() + cut_blocks, | 
|  | 305 | extent.num_blocks() - cut_blocks); | 
|  | 306 | } else { | 
|  | 307 | // We need to cut blocks on the middle of the extent, possible up to the | 
|  | 308 | // end of it. | 
| Amin Hassani | 232f8f9 | 2019-01-14 16:15:31 -0800 | [diff] [blame] | 309 | result.push_back(ExtentForRange( | 
|  | 310 | extent.start_block(), iter->start_block() - extent.start_block())); | 
| Alex Deymo | a376a6e | 2015-06-05 00:31:34 +0200 | [diff] [blame] | 311 | uint64_t new_start = iter->start_block() + iter->num_blocks(); | 
|  | 312 | uint64_t old_end = extent.start_block() + extent.num_blocks(); | 
|  | 313 | if (new_start >= old_end) { | 
|  | 314 | extent.set_num_blocks(0); | 
|  | 315 | break; | 
|  | 316 | } | 
|  | 317 | extent = ExtentForRange(new_start, old_end - new_start); | 
|  | 318 | } | 
|  | 319 | } | 
|  | 320 | if (extent.num_blocks() > 0) | 
|  | 321 | result.push_back(extent); | 
|  | 322 | } | 
|  | 323 | return result; | 
|  | 324 | } | 
|  | 325 |  | 
| Andrew de los Reyes | 5fdae4a | 2010-10-05 10:47:42 -0700 | [diff] [blame] | 326 | }  // namespace chromeos_update_engine |