Hello, Zhaoming Luo, le lun. 17 févr. 2025 09:14:13 +0800, a ecrit: > This is what I have done to try to open the storeio translator in > ext2fs, like what's mentioned in the TODO list. > ``` > error_t err; > mach_port_t bootstrap; > > - /* Initialize the diskfs library, parse arguments, and open the store. > - This starts the first diskfs thread for us. */ > - store = diskfs_init_main (&startup_argp, argc, argv, > - &store_parsed, &bootstrap); > + /* Initialize the diskfs library. Must come before any other diskfs call. > */ > + err = diskfs_init_diskfs (); > + if (err) > + error (4, err, "diskfs_init_diskfs"); > + > + file_t source = file_name_lookup ("/dev/hd0s1", O_READ, 0);
That cannot work: we do not have a filesystem yet at this moint. With the current bootstrap chain, storeio would support device_open on its control port, so that ext2fs can call device_open("hd0s1") on its bootstrap port. > But I got stuck at 'add a storeio translator before it'. Does that mean > adding a bootstrap routine for storeio? Yes, that sees that its next-task port is non-nul and thus use its bootstrap port to perform device_open("hd0") (which will be handled by rumpdisk). > And I'm quite curious about the following statement in the TODO list: > "That wouldn't need any code modification if we were using an initial > ramfs exposing that storeio on /dev/wd0s1." This is about the new ramfs-based initialization that was proposed some time ago. That's much more ample work to do that. > Sorry for so many questions, I'm not very familiar with the boot > process. Very few people are, that's really not surprising. And yes, "as usual" it's not very documented. Notably because everytime somebody changes something in the code, they don't think about updating the documentation... Samuel