Commit 482a65c
committed
fix: only reset dirty bitmap if all regions were dumped successfully
When taking a diff snapshot, Firecracker resets the dirty bitmap of each
guest memory region if the region itself was successfully dumped to the
snapshot memory file. This is wrong, because a later region might fail,
and then some regions will have their dirty bitmap reset, yet no
snapshot was successfully taken, meaning a failure during diff snapshot
taking will forever corrupt the dirty bitmap.
Fix this by only reset the dirty bitmap of all regions after (and if!)
all regions were successfully dumped to the file.
Signed-off-by: Patrick Roy <[email protected]>1 parent 477200c commit 482a65c
3 files changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | | - | |
278 | 276 | | |
279 | 277 | | |
280 | 278 | | |
| |||
622 | 620 | | |
623 | 621 | | |
624 | 622 | | |
| 623 | + | |
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
| |||
656 | 655 | | |
657 | 656 | | |
658 | 657 | | |
| 658 | + | |
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 268 | + | |
| 269 | + | |
275 | 270 | | |
276 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
277 | 274 | | |
278 | 275 | | |
279 | 276 | | |
| |||
0 commit comments