Re: list of mandatory hooks in file system module implementation

"Salvatore Benedetto" <[email protected]> Sun, 24 Aug 2008 16:50:11 +0000
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
2008/8/24 J=E9r=F4me Duval <[email protected]>:
> Hi,
>
> Salvatore Benedetto wrote:
>> Hi there,
>>
>> while working on udf, from time to time I get panics on page fault
>> with an eip =3D 0x0.
>> This is clearly due to the fact that I forgot to add a certain hook,
>> probably to the fs_vnode_ops
>> structure.
>>
>> I looked around in vfs.cpp for all the FS_CALL call used
>> unconditionally (that is, without calling
>> HAS_FS_CALL first), and I thought I implemented all of them (is
>> remove_vnode necessary btw?),
>> but it seems I'm still missing something. Here is the most important
>> part of a panic I just got
>>
>>
> Maybe try to change FS_CALL() to something like:
>
> #define FS_CALL(vnode, op, params...) \
>                     if (vnode->ops->op)  \
>                          vnode->ops->op(vnode->mount->
> volume, vnode,
> params);  \
>                     else \
>                           panic("FS_CALL is NULL for " #op "\n");
>
> It should panic on a NULL op.

Nice! I think that should actually be added to the trunk. It's better
then having a
page fault on eip 0x0. What do you think?

Regards,
-- =

Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great priz=
es
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=3D100&url=3D/