[EMAIL PROTECTED] wrote on Sun, 10 Jun 2007 14:26 +1000:
> I'm trying to build pvfs2 on openSuSE 10.2 (kernel 2.6.22.rc4).  when
> running `make kmod_install` it fails with the error:
> 
> /usr/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-cache.c: In function
> 'dev_req_cache_ctor':
> /usr/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-cache.c:206: error:
> 'SLAB_CTOR_CONSTRUCTOR' undeclared (first use in this function)

In very recent (rc) kernels, they removed that.  Here's the likely
patch to fix it.  I'll check it in if you say that it works.

                -- Pete

Index: src/kernel/linux-2.6/pvfs2-cache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-cache.c,v
retrieving revision 1.40
diff -u -p -r1.40 pvfs2-cache.c
--- src/kernel/linux-2.6/pvfs2-cache.c  8 Feb 2007 18:49:50 -0000       1.40
+++ src/kernel/linux-2.6/pvfs2-cache.c  10 Jun 2007 12:25:32 -0000
@@ -203,14 +203,7 @@ static void dev_req_cache_ctor(
     pvfs2_kmem_cache_t * cachep,
     unsigned long flags)
 {
-    if (flags & SLAB_CTOR_CONSTRUCTOR)
-    {
-        memset(req, 0, sizeof(MAX_ALIGNED_DEV_REQ_DOWNSIZE));
-    }
-    else
-    {
-        gossip_err("WARNING!! devreq_ctor called without ctor flag\n");
-    }
+    memset(req, 0, sizeof(MAX_ALIGNED_DEV_REQ_DOWNSIZE));
 }
 
 int dev_req_cache_initialize(void)
@@ -269,31 +262,24 @@ static void pvfs2_inode_cache_ctor(
 {
     pvfs2_inode_t *pvfs2_inode = (pvfs2_inode_t *)new_pvfs2_inode;
 
-    if (flags & SLAB_CTOR_CONSTRUCTOR)
-    {
-        memset(pvfs2_inode, 0, sizeof(pvfs2_inode_t));
-        ClearInitFlag(pvfs2_inode);
+    memset(pvfs2_inode, 0, sizeof(pvfs2_inode_t));
+    ClearInitFlag(pvfs2_inode);
 
-        pvfs2_inode_initialize(pvfs2_inode);
+    pvfs2_inode_initialize(pvfs2_inode);
 
 #ifndef PVFS2_LINUX_KERNEL_2_4
-        /*
-           inode_init_once is from 2.6.x's inode.c; it's normally run
-           when an inode is allocated by the system's inode slab
-           allocator.  we call it here since we're overloading the
-           system's inode allocation with this routine, thus we have
-           to init vfs inodes manually
-        */
-        inode_init_once(&pvfs2_inode->vfs_inode);
-        pvfs2_inode->vfs_inode.i_version = 1;
+    /*
+       inode_init_once is from 2.6.x's inode.c; it's normally run
+       when an inode is allocated by the system's inode slab
+       allocator.  we call it here since we're overloading the
+       system's inode allocation with this routine, thus we have
+       to init vfs inodes manually
+    */
+    inode_init_once(&pvfs2_inode->vfs_inode);
+    pvfs2_inode->vfs_inode.i_version = 1;
 #endif
-        /* Initialize the reader/writer semaphore */
-        init_rwsem(&pvfs2_inode->xattr_sem);
-    }
-    else
-    {
-        gossip_err("WARNING!! inode_ctor called without ctor flag\n");
-    }
+    /* Initialize the reader/writer semaphore */
+    init_rwsem(&pvfs2_inode->xattr_sem);
 }
 
 static void pvfs2_inode_cache_dtor(
@@ -403,14 +389,7 @@ static void kiocb_ctor(
     pvfs2_kmem_cache_t * cachep,
     unsigned long flags)
 {
-    if (flags & SLAB_CTOR_CONSTRUCTOR)
-    {
-        memset(req, 0, sizeof(pvfs2_kiocb));
-    }
-    else
-    {
-        gossip_err("WARNING!! kiocb_ctor called without ctor flag\n");
-    }
+    memset(req, 0, sizeof(pvfs2_kiocb));
 }
 
 
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users

Reply via email to