Subject: Re: CVS commit: src/sys/miscfs/kernfs
To: Christos Zoulas <christos@astron.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: source-changes
Date: 06/23/2006 20:16:01
On Fri, Jun 23, 2006 at 04:37:57PM +0000, Christos Zoulas wrote:
> >But it does not work when you are not using Xen! jeez, can we please
> >test things?
>
> And by simple code inspection:
>
> 1. If you don't kernfs_alloctype (which obviously xen does so it works)
> the splay tree will be empty so the read method will not be found.
Yes, that's what I found. All the ops using kernfs_try_fileop() are broken.
I can confirm that write are broken too, and the write code has been there
for years.
> 2. kernfs_try_fileop() is being passed an errno of 0 in the read or write
> case, so if the fileop is not found the operation will silently succeed.
> I don't think that this is how the read case was handled before. I think
> that they should all return EOPNOTSUPP or something in the case the
> fileop is not found.
Agreed for read(). write in this state for years, so I don't know if
write silently failing was intended or not.
>
> So all the ports are broken except of xen. Either back it out again,
> or fix it ASAP.
This code has been there for more than 3 months. Either kernfs is not
used much outside of Xen and leaving it in this state a few more days while
a real fix is found is not a big deal, it broke recently and my code is
not to blame.
Anyway I'm looking at it.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--