Re: [PATCH] Adding-storeio-to-the-bootstrap-chain.

Samuel Thibault <[email protected]>
Newsgroups gmane.os.hurd.bugs
Organization I am not organized
Message-ID <afvKBzmcO5bSuzOj@end>
Mikhail Karpov, le mer. 06 mai 2026 11:06:52 +0700, a ecrit:
> On Tue, 28 Apr 2026 23:01:42 Samuel Thibault wrote:
> 
> Well, I managed to stop using libmachdev, but I still couldn't get the store
> from storeio.
> 
> > Opening the store can be done provided that you have the bootstrap
> > port.  And you have it from the special port, you can just pick it
> > up with task_get_bootstrap_port and use it. You just need to make
> > sure that storeio resumes the next task after being ready to serve
> > file_get_storage_info.
> 
> Passing the storeio_port obtained from task_get_bootstrap_port to
> store_create

That's not what I wrote previously: you need to call fsys_getroot on
that control port, to get an actual file_t, on which the file RPCs will
work.

> I'm also confused about where
> and with what parameters fsys_getroot should be called. I tried calling it
> in
> storeio_bootstrap_startup after task_resume (next_task) with the
> storeio_fsys->underlying parameter

You are talking about a fsys_getroot inside storeio, right? That's not
what I wrote.

What I wrote is that it's ext2fs, just before calling store_create,
which should call fsys_getroot on the storeio control port that ext2fs
got as bootstrap port, to get the root of storeio as file_t. And then it
can call file_get_storage_info on it.

You can see an example of simple fsys_getroot call in acpi_device_open
or pci_device_open.

> > Not sure what you mean. You don't need to interact with exec etc. before
> > interacting with storeio and rumpdisk.
> 
> As far as I understand, the mechanism for calling exec from ext2fs is
> roughly analogous to what storeio requires for ext2fs.

No, it's a completely different dance, which also involves proc, auth
and startup.

What you want to look at is e.g. the relation between the pci-arbiter
translator and the acpi translator at bootstrap. See the
hurd/bootstrap wiki page:


# acpi getting initialized

acpi's `trivfs_S_fsys_init` gets called from the `fsys_init` call from
rumpdisk. It calls `fsys_init` on its bootstrap port.

# pci-arbiter getting initialized

pci-arbiter's `trivfs_S_fsys_init` gets called from the `fsys_init` call from
acpi.

It gets the root node of ext2fs, sets all common ports, and install
itself in the ext2fs FS as translator for `/servers/bus/pci`.

It eventually calls `startup_essential_task` to tell startup that it is ready,
and requests shutdown notifications.

# back to acpi initialization

It gets the root node of ext2fs, sets all common ports, and install
itself in the ext2fs FS as translator for `/servers/acpi`.

It eventually calls `startup_essential_task` to tell startup that it is ready,
and requests shutdown notifications.


And it's the same between rumpdisk and acpi.

Samuel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.