fat/harness: filesystems coexist without the shared vfs name; two-volume proof (S3)
A second usb-storage device (a generated data volume, serial da7a0001, an empty FAT with no /system) plugged in beside the boot volume: the volume manager adopts both devices and spawns a confined fat per volume, each mounted at its own content id-path. The test surfaced a real coexistence bug. Every filesystem bound the single "vfs" contract name under /protocol; the second volume's fat lost the race, service.run refused-and-exited on the held name, and that volume never mounted. Clients don't reach filesystems by that name — fs_resolve routes a path to its backing endpoint through the kernel mount table by prefix — and nothing consumes "vfs", so the fix is to bind no shared name: the harness's service_name now defaults to null. This is the "this fades" the harness comment anticipated for the volume-manager era; a filesystem's endpoint still serves as its mount backend without a name. fat logs "is a data volume" for the non-system branch so the test can positively assert content-based detection. make-fat-image gains --serial/--label (default unchanged) so a second image gets a distinct id-path; the data image is generated per run, never committed. The case fails against the pre-fix harness (the data volume's fat exits on the refused bind) — toggle-demonstrated. Full suite 129/129 (128 + two-volumes); the single-volume path is unaffected by dropping the vestigial name bind.
This commit is contained in:
@@ -188,6 +188,8 @@ fn fatBringUp(endpoint: ipc.Handle) ?Harness.Volume {
|
||||
mount_specs[1] = .{ .prefix = "/system/configuration", .rewrite = "/system/configuration" };
|
||||
mount_specs[2] = .{ .prefix = "/system/logs", .rewrite = "/system/logs" };
|
||||
mount_count = 3;
|
||||
} else {
|
||||
std.log.info("volume {d} is a data volume; mounted at {s}", .{ my_volume_id, volume_mount_prefix });
|
||||
}
|
||||
return .{ .engine = &filesystem, .mounts = mount_specs[0..mount_count], .flush = flushIfDirty };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user