Subject: Re: new kpi proposal, sysdisk(9)
To: None <elad@NetBSD.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 01/08/2007 15:37:02
> YAMAMOTO Takashi wrote:
>
> > how about something like the attached patch?
>
> this looks okay. what I dislike is that it's a bit more complicated than
> I wanted (create + open, use, unuse, close+ destroy).
i separated diskuser_create() from disk_use(), so that you can call
diskuser_add_some_more_info() in the middle of them.
> > "query" part is not yet, but it shouldn't be too hard.
>
> I'd like to see this implemented first, and how it should be used.
i'm thinking something like this:
disk_userlist_t *list;
error = diskuserlist_query(vp, &list);
...
diskuserlist_foreach(iterator, list) {
if (diskuser_is_a(iterator, "swap")) {
/* the partition is used as swap */
...
}
}
...
diskuserlist_done(list);
> also: do you think we could use this interface to solve another problem
> I mentioned a while ago? see comment in:
>
> http://nxr.netbsd.org/source/xref/sys/kern/kern_verifiedexec.c#835
>
> -e.
i don't understand the comment. can you explain?
YAMAMOTO Takashi