[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Kernel header vs libext2fs headers

On Mar 15, 2008  05:17 +0100, Carlo Wood wrote:
> On Sat, Mar 15, 2008 at 11:26:37AM +0800, Andreas Dilger wrote:
> > the fs/ext3 code are EXT3_*, and similarly, all of the definitions in
> > fs/ext2 are EXT2_*, and in fs/ext4 they are EXT4_*.  This avoids name
> > conflicts.
> > 
> > Conversely (though I don't necessarily agree with this) the definitions
> > in libext2fs declare these flags depending on what "version" of extN
> > the feature was first added (EXT2_*, EXT3_*, EXT4_*).  That makes it
> > easier to see what kernel is using which feature, but isn't always 100%
> > accurate or correct.
> But if EXT4_ORPHAN_FS is defined, then you imply that ext4 is the
> first version of ext that has implemented it; however, the ext3 kernel
> header defines it, so you should use EXT3_ORPHAN_FS in e2fsprogs.
> Or am I missing something? If ORPHAN_FS was truely new since ext4,
> shouldn't it be missing in /usr/include/linux/ext3_fs.h ?

Actually, I'm not sure what is going on there.  In lib/ext2fs/ext2_fs.h
it is in fact defined as EXT4_ORPHAN_FS, but this has been in use on
ext3 for a long time, so you are right - there is a bug in the e2fsprogs
version of ext2_fs.h.

Can you please submit a patch to Ted with this change.  It is probably
also worth noting that this flag is only used in memory and not on disk.
Since it shares the same in-memory variable with EXT2_ERROR_FS it needs
to be declared in e2fsprogs to avoid conflict, but otherwise has no meaning.

Cheers, Andreas
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]