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

Re: Building XFS 1.3 under 2.4.20



Responding to two different emails here, both look like the
same problem.

On Fri, 2003-08-22 at 05:56, Doubter wrote:
> Surely doing something wrong...
> 
> I got ftp://kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.bz2
> then  
> ftp://oss.sgi.com/projects/xfs/Release-1.3/pre6/kernel_patches/linux-2.4.20-core-xfs-1.3.0.patch.gz
> and   
> ftp://oss.sgi.com/projects/xfs/Release-1.3/pre6/kernel_patches/linux-xfs-1.3.0pre6.patch.gz
> 
> putting all together...
> 
> tar xfj linux-2.4.20.tar.bz2
> gunzip *patch.gz
> cd linux-2.4.20
> patch -p1 < ../linux-2.4.20-core-xfs-1.3.0.patch
> patch -p1 < ../linux-xfs-1.3.0pre6.patch
> cp ../good_config .config
> make oldconfig
> make dep
> make bzImage
> 
> .. I got
> gcc -D__KERNEL__ -I/html/kernel/2.4.20/linux-2.4.20/include -Wall 
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686  -I.. 
> -funsigned-char -nostdinc -iwithprefix include -DKBUILD_BASENAME=xfs_super  
> -c -o xfs_super.o xfs_super.c
> xfs_super.c:859: unknown field `sync_fs' specified in initializer
> xfs_super.c:859: warning: initialization from incompatible pointer type
> xfs_super.c:860: duplicate initializer
> xfs_super.c:860: (near initialization for 
> `linvfs_sops.write_super_lockfs')
> make[4]: *** [xfs_super.o] Error 1
> make[4]: Leaving directory `/html/kernel/2.4.20/linux-2.4.20/fs/xfs/linux'
> make[3]: *** [first_rule] Error 2
> make[3]: Leaving directory `/html/kernel/2.4.20/linux-2.4.20/fs/xfs/linux'
> make[2]: *** [_subdir_linux] Error 2
> make[2]: Leaving directory `/html/kernel/2.4.20/linux-2.4.20/fs/xfs'
> make[1]: *** [_subdir_xfs] Error 2
> make[1]: Leaving directory `/html/kernel/2.4.20/linux-2.4.20/fs'
> make: *** [_dir_fs] Error 2
> 

When I wrote that code originally, it was ifdefed for different kernel
versions, the sync_fs call does not exist in 2.4.20, this is your
problem. You can delete the reference to sync_fs and it should build.

Make it look like this in fs/xfs/linux/xfs_super.c

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,21)
STATIC int
linvfs_sync_super(
        struct super_block      *sb)
{
        vfs_t           *vfsp = LINVFS_GET_VFS(sb);
        int             error;

        VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_WAIT, NULL, error);
        return -error;
}
#endif


#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,21)
        .sync_fs                = linvfs_sync_super,
#endif

It looks like this code was not carried forwards when it was merged into
1.3.

Steve