Re: list of mandatory hooks in file system module implementation
Ingo Weinhold <[email protected]> Sun, 24 Aug 2008 21:24:47 +0200
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2008-08-24 at 18:50:11 [+0200], Salvatore Benedetto <[email protected]> = wrote: > 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? Mmh well, it adds quite a bit of code where not necessary -- the = non-mandatory hooks are checked anyway. Maybe only when KDEBUG is enabled t= he = macro could do the check. It would have to look a bit different though, sin= ce = the hooks have return values. CU, Ingo ------------------------------------------------------------------------- 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/