Commit ed07932
fsck: remove overlay for directories that aren't on disk
Summary:
During startup, EdenFS loads inodes for all the directories present in the
overlay, with the assumption that the state of the overlay represents the state
of the filesystem. Today, this is mostly true as the working copy only grows
and thus the only way for the working copy and overlay to shrink is to update
past commits that delete a directory.
In the future however, EdenFS will gain the ability to shrink its working copy,
either manually, or automatically. When this happens, the overlay will still
contain data for directories that are no longer in the working copy, thus
invalidating the assumption that working copy and overlay stay in sync.
To fix this, we simply need to teach the fsck code to remove overlay
directories when a directory isn't present on disk.
Reviewed By: kmancini
Differential Revision: D41007167
fbshipit-source-id: 2a6d93417995b9bb8f96c757d47b444c17ab82f81 parent e1a1982 commit ed07932
2 files changed
Lines changed: 39 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
495 | 502 | | |
496 | 503 | | |
497 | 504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
250 | 281 | | |
251 | 282 | | |
252 | 283 | | |
| |||
0 commit comments