On Tue, 21 Nov 2023 at 02:33, Ian Kent <raven@xxxxxxxxxx> wrote: > I've completely lost what we are talking about. I started thinking about a good userspace API, and I'm skeptical about the proposed kernel API being good for userspace as well. Maybe something like this would be the simplest and least likely to be misused (and also very similar to opendir/readdir/closedir): handle = listmount_open(mnt_id, flags); for (;;) { child_id = listmount_next(handle); if (child_id == 0) break; /* do something with child_id */ } listmount_close(handle) Thanks, Miklos