2002-10-15 15:20:41

by Christian Guggenberger

[permalink] [raw]
Subject: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

Hi Andrea,

I'm trying to compile 2.4.20-pre10aa1 with xfs enabled as module.
make modules_install ends up in:

depmod: *** Unresolved symbols in
/lib/modules/2.4.20-pre10aa1/kernel/fs/xfs/xfs.o
depmod: do_generic_file_write

what to do?

Christian


2002-10-15 16:13:25

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

On Tue, Oct 15, 2002 at 05:25:58PM +0200, Christian Guggenberger wrote:
> Hi Andrea,
>
> I'm trying to compile 2.4.20-pre10aa1 with xfs enabled as module.
> make modules_install ends up in:
>
> depmod: *** Unresolved symbols in
> /lib/modules/2.4.20-pre10aa1/kernel/fs/xfs/xfs.o
> depmod: do_generic_file_write
>
> what to do?

I logged it so it will be fixed. You can link it into the kernel in the
meantime (select Y instead of M). For some reason bleeding edge gcc from
CVS generates a flood of symbol errors when I run depmod before
rebooting, so I don't easily notice these missing exports anymore (I
should run depmod post reboot to notice them). thanks,

Andrea

2002-10-15 16:36:14

by Christian Guggenberger

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

On 15 Oct 2002 18:19:08 Andrea Arcangeli wrote:
> On Tue, Oct 15, 2002 at 05:25:58PM +0200, Christian Guggenberger wrote:
> > Hi Andrea,
> >
> > I'm trying to compile 2.4.20-pre10aa1 with xfs enabled as module.
> > make modules_install ends up in:
> >
> > depmod: *** Unresolved symbols in
> > /lib/modules/2.4.20-pre10aa1/kernel/fs/xfs/xfs.o
> > depmod: do_generic_file_write
> >
> > what to do?
>
> I logged it so it will be fixed. You can link it into the kernel in the
> meantime (select Y instead of M). For some reason bleeding edge gcc from
> CVS generates a flood of symbol errors when I run depmod before
> rebooting, so I don't easily notice these missing exports anymore (I
> should run depmod post reboot to notice them). thanks,

nope, static linking ends up in an error, too.

fs/fs.o: In function `xfs_write':
fs/fs.o(.text+0xa1158): undefined reference to `do_generic_file_write'
make: *** [vmlinux] Error 1

Christian

2002-10-15 17:10:36

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

On Tue, Oct 15, 2002 at 06:41:48PM +0200, Christian Guggenberger wrote:
> On 15 Oct 2002 18:19:08 Andrea Arcangeli wrote:
> >On Tue, Oct 15, 2002 at 05:25:58PM +0200, Christian Guggenberger wrote:
> >> Hi Andrea,
> >>
> >> I'm trying to compile 2.4.20-pre10aa1 with xfs enabled as module.
> >> make modules_install ends up in:
> >>
> >> depmod: *** Unresolved symbols in
> >> /lib/modules/2.4.20-pre10aa1/kernel/fs/xfs/xfs.o
> >> depmod: do_generic_file_write
> >>
> >> what to do?
> >
> >I logged it so it will be fixed. You can link it into the kernel in the
> >meantime (select Y instead of M). For some reason bleeding edge gcc from
> >CVS generates a flood of symbol errors when I run depmod before
> >rebooting, so I don't easily notice these missing exports anymore (I
> >should run depmod post reboot to notice them). thanks,
>
> nope, static linking ends up in an error, too.
>
> fs/fs.o: In function `xfs_write':
> fs/fs.o(.text+0xa1158): undefined reference to `do_generic_file_write'
> make: *** [vmlinux] Error 1

do_generic_file_write is missing, one patch is probably missing, I will
fix it in a few days, the last usable xfs was probably in 2.4.20pre5aa1.

Andrea

2002-10-15 18:06:23

by Christoph Hellwig

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

On Tue, Oct 15, 2002 at 07:16:15PM +0200, Andrea Arcangeli wrote:
> On Tue, Oct 15, 2002 at 06:41:48PM +0200, Christian Guggenberger wrote:
> > On 15 Oct 2002 18:19:08 Andrea Arcangeli wrote:
> > >On Tue, Oct 15, 2002 at 05:25:58PM +0200, Christian Guggenberger wrote:
> > >> Hi Andrea,
> > >>
> > >> I'm trying to compile 2.4.20-pre10aa1 with xfs enabled as module.
> > >> make modules_install ends up in:
> > >>
> > >> depmod: *** Unresolved symbols in
> > >> /lib/modules/2.4.20-pre10aa1/kernel/fs/xfs/xfs.o
> > >> depmod: do_generic_file_write
> > >>
> > >> what to do?
> > >
> > >I logged it so it will be fixed. You can link it into the kernel in the
> > >meantime (select Y instead of M). For some reason bleeding edge gcc from
> > >CVS generates a flood of symbol errors when I run depmod before
> > >rebooting, so I don't easily notice these missing exports anymore (I
> > >should run depmod post reboot to notice them). thanks,
> >
> > nope, static linking ends up in an error, too.
> >
> > fs/fs.o: In function `xfs_write':
> > fs/fs.o(.text+0xa1158): undefined reference to `do_generic_file_write'
> > make: *** [vmlinux] Error 1
>
> do_generic_file_write is missing, one patch is probably missing, I will
> fix it in a few days, the last usable xfs was probably in 2.4.20pre5aa1.

No. you removed that patch in your last release because marcelo
merged a part of it..

Still required part of 00_o_direct-read-overflow-write-locking-xfs-1
below:

diff -urNp 2.4.19rc1/include/linux/fs.h odirect/include/linux/fs.h
--- 2.4.19rc1/include/linux/fs.h Tue Jun 25 23:56:21 2002
+++ odirect/include/linux/fs.h Wed Jun 26 17:42:48 2002
@@ -1434,6 +1434,7 @@ extern int generic_file_mmap(struct file
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
+extern ssize_t do_generic_file_write(struct file *, const char *, size_t, loff_t *);
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
diff -urNp 2.4.19rc1/mm/filemap.c odirect/mm/filemap.c
--- 2.4.19rc1/mm/filemap.c Tue Jun 25 23:56:23 2002
+++ odirect/mm/filemap.c Wed Jun 26 17:42:50 2002
@@ -2914,7 +2917,7 @@ inline void remove_suid(struct inode *in
* [email protected]
*/
ssize_t
-generic_file_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
+do_generic_file_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
{
struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
struct inode *inode = mapping->host;
@@ -2926,16 +2929,8 @@ generic_file_write(struct file *file,con
int err;
unsigned bytes;

- if ((ssize_t) count < 0)
- return -EINVAL;
-
- if (!access_ok(VERIFY_READ, buf, count))
- return -EFAULT;
-
cached_page = NULL;

- down(&inode->i_sem);
-
pos = *ppos;
err = -EINVAL;
if (pos < 0)
@@ -3114,7 +3109,6 @@ out_status:
err = written ? written : status;
out:

- up(&inode->i_sem);
return err;
fail_write:
status = -EFAULT;
@@ -3141,7 +3135,6 @@ o_direct:
mark_inode_dirty(inode);
}
*ppos = end;
- invalidate_inode_pages2(mapping);
}
/*
* Sync the fs metadata but not the minor inode changes and
@@ -3152,6 +3145,30 @@ o_direct:
goto out_status;
}

+EXPORT_SYMBOL(do_generic_file_write);
+
+ssize_t
+generic_file_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
+{
+ struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
+ int err;
+
+ if ((ssize_t) count < 0)
+ return -EINVAL;
+
+ if (!access_ok(VERIFY_READ, buf, count))
+ return -EFAULT;
+
+ down(&inode->i_sem);
+ err = do_generic_file_write(file, buf, count, ppos);
+
+ if ((err > 0) && (file->f_flags & O_DIRECT))
+ invalidate_inode_pages2(file->f_dentry->d_inode->i_mapping);
+ up(&inode->i_sem);
+
+ return err;
+}
+
void __init page_cache_init(unsigned long mempages)
{
unsigned long htable_size, order;

2002-10-15 21:29:29

by Andi Kleen

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

Andrea Arcangeli <[email protected]> writes:

> I logged it so it will be fixed. You can link it into the kernel in the
> meantime (select Y instead of M). For some reason bleeding edge gcc from
> CVS generates a flood of symbol errors when I run depmod before
> rebooting, so I don't easily notice these missing exports anymore (I
> should run depmod post reboot to notice them). thanks,

Upgrade your modutils.

Newer binutils changes the format of System.map and __ksym* symbols
have a 'R' now instead of a '?' in the type field. This breaks old modutils
which have the '?' hardcoded.

-Andi

2002-10-15 21:31:26

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

On Tue, Oct 15, 2002 at 07:12:07PM +0100, Christoph Hellwig wrote:
> No. you removed that patch in your last release because marcelo
> merged a part of it..

correct, thanks.

Andrea

2002-10-16 10:29:31

by Keith Owens

[permalink] [raw]
Subject: Re: 2.4.20-pre10-aa1: unresolved symbol in xfs.o

On Tue, 15 Oct 2002 18:19:08 +0200,
Andrea Arcangeli <[email protected]> wrote:
>For some reason bleeding edge gcc from
>CVS generates a flood of symbol errors when I run depmod before
>rebooting, so I don't easily notice these missing exports anymore (I
>should run depmod post reboot to notice them). thanks,

modutils 2.4.17 has a change for recent binutils.