Subject: Re: members of struct *fs
To: Konrad Schroder <perseant@hitl.washington.edu>
From: Jaromir Dolecek <jdolecek@per4mance.cz>
List: tech-kern
Date: 12/16/1998 02:26:46
Konrad Schroder wrote:
> Someone else mentioned an ancient compiler restriction that structure
> names were held in a global table ... I find that my own brain tends to
> work that way :^) In particular, there are a lot of #defines that refer
> what would appear to be members of, say, (struct inode), to (struct
> dinode), that could be somewhat more confusing if the prefixes were left
> off. (Now if they were standardized, e.g. "ip->i_fs_mode" instead of
> "ip->i_(e2|f|l)fs_mode", I would have no problem with that at all.)
These funny i_(e2|f}fs_FOO macros can't be easily taken out, because
one of their function is reach over to proper union member
of inode->u.
>
> In addition, and perhaps a better reason against: while making would make
> e2fs and ffs share code better, would mean less (and more difficult) code
> sharing between other OSes unless they also adopt the same change.
Yeah, that's true. But IMHO it's better to have single code base
from maintanence view - it's much more easy to fix bugs
in one place than to have go through several places,
where the code is similar and fix it there as well. ext2fs and ffs
are really very similar and quite a big part of code is
almost exact the same - just other direntry struct and
of course other funny i_xfs_FOO macro is used.
--
Jaromir Dolecek <dolecek@ics.muni.cz> http://www.ics.muni.cz/~dolecek/
-------------------------------------------------------------------------
It is better never to have been born. But who among us has such luck?
One in a million, perhaps.