Commit fce1834
committed
fuse: Expose FUSE serving via CLI and varlink RPC
Wire the composefs-fuse crate into cfsctl behind a new `fuse` cargo
feature (on by default) and expose it through both the command line and
the varlink RPC API, with an integration test exercising the FUSE mount
end to end.
CLI surface:
- `cfsctl fuse-serve <image> <mountpoint>` serves an EROFS composefs
image over FUSE from a file on disk.
- `cfsctl oci mount --fuse[=<opts>]` FUSE-serves an OCI image's EROFS
instead of doing a kernel composefs mount, so it works without
fs-verity on the backing store. `--fuse=passthrough` opts into
kernel-bypass reads (Linux 6.9+). Options are parsed via a small
FuseOptions FromStr so the surface can grow without new flags.
Varlink surface:
- `org.composefs.Repository.FuseServe` and `org.composefs.Oci.OciFuseMount`
let a client drive FUSE mounts over the RPC socket. Both take a
`wait` parameter: with `wait=true` the call blocks for the session;
with `wait=false` the FUSE session is detached into a background task
and the call returns once the mount is registered, so a caller can
mount and then go on to use the filesystem.
The privileged_fuse_dumpfile_roundtrip integration test spawns
`cfsctl fuse-serve` as a subprocess, polls for mount readiness via st_dev
change, reads external files directly, and compares the dumpfile produced
by `cfsctl create-dumpfile` over the FUSE mount against the expected
output from write_dumpfile, asserting the FUSE implementation reports
every piece of metadata the dumpfile format captures. Uses
similar_asserts for readable diffs on mismatch.
Assisted-by: OpenCode (claude-sonnet-4-6)
Signed-off-by: Colin Walters <walters@verbum.org>1 parent 0262e1e commit fce1834
5 files changed
Lines changed: 1419 additions & 96 deletions
File tree
- crates
- composefs-ctl
- src
- composefs-integration-tests
- src/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
321 | 348 | | |
322 | 349 | | |
323 | 350 | | |
| |||
447 | 474 | | |
448 | 475 | | |
449 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
450 | 488 | | |
451 | 489 | | |
452 | 490 | | |
| |||
584 | 622 | | |
585 | 623 | | |
586 | 624 | | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
587 | 642 | | |
588 | 643 | | |
589 | 644 | | |
| |||
1264 | 1319 | | |
1265 | 1320 | | |
1266 | 1321 | | |
| 1322 | + | |
1267 | 1323 | | |
1268 | | - | |
1269 | | - | |
1270 | 1324 | | |
1271 | 1325 | | |
1272 | 1326 | | |
| |||
1289 | 1343 | | |
1290 | 1344 | | |
1291 | 1345 | | |
1292 | | - | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1293 | 1390 | | |
1294 | 1391 | | |
1295 | 1392 | | |
| |||
1521 | 1618 | | |
1522 | 1619 | | |
1523 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
1524 | 1651 | | |
1525 | 1652 | | |
1526 | 1653 | | |
| |||
0 commit comments