fat: mount at the id-path from argv; migrate /volumes/usb -> id-path (S2)
The flip that makes the mount path the volume's content id. fat retires its hardcoded fat_mounts: it reads its mount path from argv[2] (the volume manager hands it the id-path, e.g. /volumes/fat-12345678, from the FAT serial), mounts its volume root there, and installs the /system/configuration + /system/logs FHS rewrites so /system/logs persistence stays decoupled from which volume backs it. The rewrites are unconditional this increment (the single volume IS the boot volume); S3 makes them content-conditional across N volumes. Every /volumes/usb reference migrates to /volumes/fat-12345678 in one commit — the fat-test, badge-scope-test, and vfs-test fixtures and the four QEMU regexes — plus a new volume-identity-name case asserting the id-path mount and the /system/logs rewrite. Discrimination: the regexes now require /volumes/fat-12345678, which the old hardcoded fat never emitted (it mounted /volumes/usb). Full suite 128/128.
This commit is contained in:
@@ -77,7 +77,7 @@ fn park() void {
|
||||
var parked: ?fs.File = null;
|
||||
var tries: u32 = 0;
|
||||
while (parked == null and tries < 1000) : (tries += 1) {
|
||||
parked = fs.open("/volumes/usb/parked", .{ .create = true });
|
||||
parked = fs.open("/volumes/fat-12345678/parked", .{ .create = true });
|
||||
if (parked == null) time.sleepMillis(20);
|
||||
}
|
||||
if (parked == null) {
|
||||
@@ -92,16 +92,16 @@ fn park() void {
|
||||
// "parked" marker, which fails the vfs-client-death case: before the
|
||||
// ownership gate existed, any process could unmount any prefix, and this
|
||||
// fixture would have deleted the volume out from under the whole boot.
|
||||
if (fs.fsUnmount("/volumes/usb")) {
|
||||
if (fs.fsUnmount("/volumes/fat-12345678")) {
|
||||
_ = logging.write("vfstest: foreign unmount was ALLOWED\n");
|
||||
return;
|
||||
}
|
||||
if (fs.open("/volumes/usb/parked", .{})) |resolved| {
|
||||
if (fs.open("/volumes/fat-12345678/parked", .{})) |resolved| {
|
||||
var verification = resolved;
|
||||
verification.close(); // the park below must be the client's ONLY open
|
||||
// handle — the kernel test string-matches "released 1 handle(s)".
|
||||
} else {
|
||||
_ = logging.write("vfstest: /volumes/usb gone after refused unmount\n");
|
||||
_ = logging.write("vfstest: /volumes/fat-12345678 gone after refused unmount\n");
|
||||
return;
|
||||
}
|
||||
_ = logging.write("vfstest: foreign unmount refused\n");
|
||||
|
||||
Reference in New Issue
Block a user