xfs
[Top] [All Lists]

Re: XFS as Root filesystem

To: phil@xxxxxxxxxxxxx
Subject: Re: XFS as Root filesystem
From: cattelan@xxxxxxxxxxx
Date: Thu, 13 Apr 2000 13:33:17 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: In your message of "Thu, 13 Apr 2000 14:54:36 -0400" <20000413145436.D1665@linuxcare.com>
References: <phil@linuxcare.com> <200004131528.KAA07085@jen.americas.sgi.com> <20000413141657.C1665@linuxcare.com> <14582.2179.583864.62523H@gibble.americas.sgi.com> <20000413145436.D1665@linuxcare.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Wanderlust/1.0.3 (Notorious) tm/7.108 XEmacs/21.1 (Bryce Canyon)
At Thu, 13 Apr 2000 14:54:36 -0400,
Phil Schwan <phil@xxxxxxxxxxxxx> wrote:
> 
> 
> On Apr 13, cattelan@xxxxxxxxxxx wrote:
> > First it would be best not to include linux/fs.h in any file
> > not in the fs/xfs/linux directory. It will cause headaches.
> > 
> > If fact that linux/xfs_sema.h shouldn't be there either.
> > 
> > If the file is general enough say types.h it can go
> > in xfs_os_defs.h; I doesn't really hurt if some
> > *.c files include some header files they don't need.
> > As long as it doesn't create conflicts.
> > 
> > if you really really need to include fs.h put it
> > in xfs_os_defs.h  with an
> > #ifdef NEED_FS_H wrapper.
> > then define it in what ever file that it is needed.
> 
> If I were to change this:
> 
> #include <xfs_os_defs.h>
> 
> #ifdef SIM
> #define _KERNEL 1
> #define __KERNEL__ 1
> #endif
> 
> #include <linux/xfs_sema.h>
> 
> to this:
> 
> #define NEED_XFS_SEMA_H
> #include <xfs_os_defs.h>
> 
> #ifdef SIM
> #define _KERNEL 1
> #define __KERNEL__ 1
> #endif
> 
> it wouldn't do the Right Thing in the SIM case, would it?
> 
The first thing xfs_os_defs.h will need is
#ifdef SIM
#define _KERNEL 1
#define __KERNEL__ 1
#endif

in the xfs_sema.h case we may not need to wrap it with the
ifdef... since it may not cause compile problems.

linux/fs.h can cause problem if includede in the wrong files.


The goal here is put as much common or problem header files in 
one spot such that they can be controlled with ifdef switches.

There is a lot work that needs to be done in this area, but
it is cleanliness issues and not functionality issues, the 
functionality is taking presidence. 


-Me

<Prev in Thread] Current Thread [Next in Thread>