Re: PATCH 2.5.2.9: ext2 unbork fs.h (part 1/7)

Jeff Garzik
2002-01-07T21:26:02Z

Daniel Phillips wrote:
> The two main problems I see with this are:
>
> - If a filesystem doesn't want to use genericp_ip/sbp then fs.h has
> to know about it. Why should fs.h know about every filesystem in
> the world?

We keep type information through this method. There is no ugly casting.

> - You are dreferencing a pointer, and have two allocations for every
> inode instead of one.

<blink> re-read.... With patch6/7 there is only one allocation.

> Moving the ext2 headers from include/linux to fs/ext2 is an interesting
> feature of your patch, though it isn't essential to the idea you're
> presenting. But is there a good reason why ext2_fs_i.h and ext2_fs_sb.h
> should remain separate from ext2_fs.h? It looks like gratuitous
> modularity to me.

I agree this is a better end goal; my patches simply did not take things
that far.

> Minor nit:
>
> if (!inode->u.ext2_ip)
> BUG();
>
> You don't have to do this, if the pointer is null you will get a perfectly
> fine oops.

BUG oops are a little bit more perfectly fine :), since they print out
filename and line number when CONFIG_DEBUG_BUGVERBOSE is enabled..

Jeff

--
Jeff Garzik | Alternate titles for LOTR:
Building 1024 | Fast Times at Uruk-Hai
MandrakeSoft | The Took, the Elf, His Daughter and Her Lover
| Samwise Gamgee: International Hobbit of Mystery