fusefs-kmod broken?

Ed Schouten ed at 80386.nl
Mon Aug 23 13:47:24 UTC 2010


* Kostik Belousov <kostikbel at gmail.com> wrote:
> On Mon, Aug 23, 2010 at 03:35:55PM +0200, Ed Schouten wrote:
> > * Kostik Belousov <kostikbel at gmail.com> wrote:
> > > Which most likely means that fusesfs filled its own struct fileops
> > > without properly initializing fo_truncate member.
> > 
> > It's a bit misleading that cdevs automatically patch the table, while
> > the fileops don't. Maybe it would be a good idea to patch finit() to
> I do not understand your first sentence. Would you please elaborate ?

Say, you create a cdev, if you don't implement all ops, it will check
for null pointers and return error codes accordingly. This doesn't
happen for fileops, which is probably one of the reasons why people
sometimes forget to implement them.

Wouldn't it be better to prevent this form of footshooting by adding
assertions? This will add some overhead for any file descriptor created,
but a kernel with INVARIANTS isn't meant to be fast.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100823/470191a4/attachment.pgp


More information about the freebsd-current mailing list