Re: [PATCH] Fix ext2_fs_sb.h for user space

Andreas Dilger <[email protected]>
Newsgroups gmane.comp.file-systems.ext2.devel
Message-ID <[email protected]>
On Jun 07, 2006  22:48 +0200, Thomas Koeller wrote:
> This patch modifies the EXT2 superblock header file
> so that it can be included by user-space programs.

Why ever would ext2_fs_sb.h need to be included in userspace programs?

This is purely related to in-kernel-memory recordkeeping and has
nothing to do with the on-disk structures (which are all in ext2_fs.h).
If anything, the inclusion of this file from ext2_fs.h should be made
"#ifdef __KERNEL__" and the whole mess avoided (same for ext3, please).

Also, it is much preferred that programs get their ext2fs/ext2_fs.h from the
e2fsprogs-devel package, which is sanitized for inclusion by userspace.

Matthew Wilcox <[email protected]> wrote:
> I was rather hoping that user programs weren't including this file so
> it could eventually be moved out of the include directory and made
> private to ext2.  If it doesn't currently work, maybe we can do that ...

No objections here.  It should probably be included directly into the
various fs/ext2/*.c files as necessary, and removed from ext2_fs.h.
The same should happen for ext3_fs_sb.h and ext3_fs_i.h.

I also wouldn't object to separating out the on-disk structures (as in
the e2fsprogs ext2_fs.h) from the kernel function declarations in order
to make it easier to keep the e2fsprogs and kernel headers consistent.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.