Zhang, Sonic
2004-Mar-02 03:02 UTC
[Ocfs2-devel] unknown symbol mark_buffer_clean found when compile OCFSv2 under kernel 2.6.0
Hi Rusty and Mark, I checked out the latest source code from the svn tree. And I also compile the source code under kernel 2.6 successfully with Rusty's makefile. But I failed to insert the ocfs2 module into the kernel 2.6. My operation: [host1]> insmod ocfs2.o node_name=westvile2 ip_address=192.168.1.14 cs=1793 guid=6B359212647D8D256E190007E903E0ED ocfs2: Unknown symbol mark_buffer_clean Error inserting 'ocfs2.o': -1 Unknown symbol in module Routine mark_buffer_clean exits in file include/linux/fs.h of kernel 2.4.x, but it is removed in kernel 2.6.x. Thanks. ********************************************* Sonic Zhang Software Engineer Intel China Software Lab Tel: (086)021-52574545-1667 iNet: 752-1667 *********************************************
Rusty Lynch
2004-Mar-02 09:13 UTC
[Ocfs2-devel] unknown symbol mark_buffer_clean found when compile OCFSv2 under kernel 2.6.0
On Tue, Mar 02, 2004 at 05:01:59PM +0800, Zhang, Sonic wrote:> > Hi Rusty and Mark, > > I checked out the latest source code from the svn tree. And I > also compile the source code under kernel 2.6 successfully with Rusty's > makefile. But I failed to insert the ocfs2 module into the kernel > 2.6. > > My operation: > [host1]> insmod ocfs2.o node_name=westvile2 ip_address=192.168.1.14 > cs=1793 guid=6B359212647D8D256E190007E903E0ED > ocfs2: Unknown symbol mark_buffer_clean > Error inserting 'ocfs2.o': -1 Unknown symbol in module > > Routine mark_buffer_clean exits in file include/linux/fs.h of > kernel 2.4.x, but it is removed in kernel 2.6.x.This is one of my remaining patches to make it into the tree. BTW, you should be loading ocfs2.ko, not ocfs2.o. Also, if you are using my makefile that utilized the kernel build system, then you can cd to the kernel build directory and install ocfs2.ko with a 'make modules_install'. Try this... Index: src/io.c ==================================================================--- src/io.c (revision 738) +++ src/io.c (working copy) @@ -277,7 +277,17 @@ set_buffer_uptodate(bh); /* remove from dirty list before I/O. */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + /* + * mark_buffer_clean() doesn't exist in 2.6.x kernels. + * Not many places actually used mark_buffer_clean, but + * at least reiserfs uses clear_buffer_dirty() as + * a replacment. + */ + clear_buffer_dirty(bh); +#else mark_buffer_clean(bh); +#endif bh->b_end_io = ocfs_end_buffer_io_sync; submit_bh(WRITE, bh); @@ -550,7 +560,17 @@ set_buffer_uptodate(bh); /* remove from dirty list before I/O. */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + /* + * mark_buffer_clean() doesn't exist in 2.6.x kernels. + * Not many places actually used mark_buffer_clean, but + * at least reiserfs uses clear_buffer_dirty() as + * a replacment. + */ + clear_buffer_dirty(bh); +#else mark_buffer_clean(bh); +#endif bh->b_end_io = ocfs_end_buffer_io_sync; submit_bh(WRITE, bh);
Joel Becker
2004-Mar-02 11:43 UTC
[Ocfs2-devel] unknown symbol mark_buffer_clean found when compile OCFSv2 under kernel 2.6.0
On Tue, Mar 02, 2004 at 05:01:59PM +0800, Zhang, Sonic wrote:> My operation: > [host1]> insmod ocfs2.o node_name=westvile2 ip_address=192.168.1.14 > cs=1793 guid=6B359212647D8D256E190007E903E0ED > ocfs2: Unknown symbol mark_buffer_clean > Error inserting 'ocfs2.o': -1 Unknown symbol in moduleYou should be using load_ocfs, provided in the ocfs-support package (and in the ocfs-tools svn repos). THis will properly set all the values from /etc/ocfs.conf, and it will call "insmod ocfs", not "insmod ocfs.[k]o", thus eliminating any 2.4 vs 2.6 problem. If load_ocfs is not working for you, please file a bug report. Joel -- "In the long run...we'll all be dead." -Unknown Joel Becker Senior Member of Technical Staff Oracle Corporation E-mail: joel.becker@oracle.com Phone: (650) 506-8127
Mark Fasheh
2004-Mar-02 16:12 UTC
[Ocfs2-devel] unknown symbol mark_buffer_clean found when compile OCFSv2 under kernel 2.6.0
On Tue, Mar 02, 2004 at 07:12:58AM -0800, Rusty Lynch wrote:> This is one of my remaining patches to make it into the tree.I just commited this btw, it seems it fell through the cracks :) --Mark -- Mark Fasheh Software Developer, Oracle Corp mark.fasheh@oracle.com