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

From: Jeff Garzik (
Date: Mon Jan 07 2002 - 16:25:42 EST

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 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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:36 EST