Commit eb52c59
authored
Support mounting file systems & migrate devices to use mounts (microsoft#995)
This PR introduces the `Composer`, which acts as a mount point for the
new core file system design (see microsoft#887). It maintains a runtime list of
dyn-safe `Backend` objects for each mount point, using as much walking
as feasible under the mount points.
To exercise the `Composer` and demonstrate how it works, I've also
switched `Devices` to stop being hardcoded to `/dev` _inside_ the
backend but instead be a flat list of devices that is _mounted_ at
`/dev`.
While this PR does not expose/use it this way yet, with this PR, finally
LiteBox core now has some of the fundamental machinery needed to
eventually support `mount(2)` family of syscalls in the Linux shim.
Future PRs will continue migrating more backends over, eventually
allowing for the old layered file system to disappear, and replaced with
this mount composition + (upcoming) overlay file system to support union
mounting.1 parent c4bbe3d commit eb52c59
7 files changed
Lines changed: 906 additions & 107 deletions
File tree
- litebox_runner_snp/src
- litebox_shim_linux/src
- litebox/src/fs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| |||
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
237 | 244 | | |
238 | 245 | | |
239 | 246 | | |
| |||
248 | 255 | | |
249 | 256 | | |
250 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
251 | 262 | | |
252 | 263 | | |
253 | 264 | | |
254 | 265 | | |
255 | 266 | | |
256 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
257 | 272 | | |
258 | 273 | | |
259 | 274 | | |
| |||
0 commit comments