Ryuta,
I think pvfs2-HEAD has already fixed these errors.
Try the attached patch and see if that works out things for you.
thanks,
Murali
On 8/10/07, ryuta <[EMAIL PROTECTED]> wrote:
>
> I've managed to force gcc to include the path. I've gotten another error:
>
> CC [M] /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.o
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:266: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:269: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:272: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:276: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:282: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:285: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:288: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:292: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:299: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:301: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:307: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:307: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:311: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:311: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:315: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:318: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:321: warning:
> initialization from incompatible pointer type
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c: In function
> 'pvfs2_proc_initialize':
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.c:340: error: too
> many arguments to function 'register_sysctl_table'
> make[3]: *** [/usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-proc.o]
> Error 1
> make[2]: *** [_module_/usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6] Error
> 2
> make[1]: *** [default] Error 2
> make: *** [just_kmod] Error 2
>
> I also attached configure kernel check. It produces some error though I
> have no idea if those errors are fatal or not.
>
>
> Murali Vilayannur wrote:
> Hi Ryuta,
> hmm.. that is weird. It is probably because gcc does not pick up
> stdarg.h from its location.
> Do you want to try and force gcc to include its default path which may
> be omitted while building the kmods for some reason (perhaps due to
> -nostdinc or -isystem?)
> export CFLAGS=/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/include
> and then redoing the configure and make kmod?
> I don't know..
> thanks,
> Murali
>
> On 8/10/07, ryuta <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I've successfully built and installed pvfs-2.3.6 on Arch Linux with kernel
> linux-2.6.22-ARCH, however, I encountered a problem building kernel
> interface.
>
> My configure option is
>
> ./configure --enable-shared --with-kernel=/usr/src/linux-2.6.22-ARCH
>
> If you see the attached config.log you can find most of kernel-related
> checking complains on the failure of including one header file "stdarg.h".
>
> Nonetheless, the PVFS2 Configuration Information displays 2.6.x kernel
> module as configured, and sure enough, "make kmod" simply fails due to
> compilation error as gcc cannot find "stdarg.h"
>
> [EMAIL PROTECTED] pvfs-2.6.3]# make kmod
> CC [M] /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.o
> In file included from ./include/linux/moduleparam.h:6,
> from
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-kernel.h:45,
> from
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c:7:
> ./include/linux/kernel.h:10:20: error: stdarg.h: No such file or directory
> In file included from ./include/linux/moduleparam.h:6,
> from
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-kernel.h:45,
> from
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c:7:
> ./include/linux/kernel.h:123: error: expected declaration specifiers or
> '...' before 'va_list'
> ./include/linux/kernel.h:127: error: expected declaration specifiers or
> '...' before 'va_list'
> ./include/linux/kernel.h:131: error: expected declaration specifiers or
> '...' before 'va_list'
> ./include/linux/kernel.h:135: error: expected declaration specifiers or
> '...' before 'va_list'
> ./include/linux/kernel.h:139: error: expected declaration specifiers or
> '...' before 'va_list'
> ./include/linux/kernel.h:155: error: expected declaration specifiers or
> '...' before 'va_list'
> In file included from
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c:7:
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-kernel.h:1267: error:
> conflicting types for 'kzalloc'
> ./include/linux/slab_def.h:55: error: previous definition of 'kzalloc' was
> here
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c: In function
> 'pvfs2_inode_removexattr':
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c:1007: error:
> 'XATTR_REPLACE' undeclared (first use in this function)
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c:1007: error:
> (Each undeclared identifier is reported only once
> /usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c:1007: error:
> for each function it appears in.)
> make[3]: *** [/usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.o]
> Error 1
> make[2]: *** [_module_/usr/local/src/pvfs-2.6.3/src/kernel/linux-2.6] Error
> 2
> make[1]: *** [default] Error 2
> make: *** [just_kmod] Error 2
>
>
>
> On my installation, there are several "stdarg.h" just like most
> installation
>
> /usr/include/c++/4.2.1/tr1/stdarg.h
> /usr/lib/gcc/i686-pc-linux-gnu/4.2.1/include/stdarg.h
>
> /usr/lib/gcc/i686-pc-linux-gnu/4.2.1/install-tools/include/stdarg.h
> /usr/lib/klibc/include/stdarg.h
>
> and gcc by default includes the path
>
> /usr/lib/gcc/i686-pc-linux-gnu/4.2.1/include
>
> as most gcc does on typical configuration.
>
> I'm not quite sure if this issue caused by Arch Linux, GCC, or PVFS.
>
> Any help will be greatly appreciated.
>
> Thank you,
> Ryuta
>
> _______________________________________________
> Pvfs2-users mailing list
> [email protected]
> http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
>
>
>
>
>
>
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/acl.c /home/vilayann/pvfs2/src/kernel/linux-2.6/acl.c
--- src/kernel/linux-2.6/acl.c 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/acl.c 2007-03-29 07:20:42.000000000 -0700
@@ -612,12 +612,17 @@
goto out;
}
acl = pvfs2_get_acl(inode, ACL_TYPE_ACCESS);
- if (IS_ERR(acl) || !acl)
+ if (IS_ERR(acl))
{
error = PTR_ERR(acl);
gossip_err("pvfs2_acl_chmod: get acl (access) failed with %d\n", error);
goto out;
}
+ if(!acl)
+ {
+ error = 0;
+ goto out;
+ }
clone = posix_acl_clone(acl, GFP_KERNEL);
posix_acl_release(acl);
if (!clone)
Only in /home/vilayann/pvfs2/src/kernel/linux-2.6/: CVS
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/devpvfs2-req.c /home/vilayann/pvfs2/src/kernel/linux-2.6/devpvfs2-req.c
--- src/kernel/linux-2.6/devpvfs2-req.c 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/devpvfs2-req.c 2007-02-08 10:49:50.000000000 -0800
@@ -232,11 +232,12 @@
return len;
}
+/* Common function for writev() and aio_write() callers into the device */
static ssize_t pvfs2_devreq_writev(
struct file *file,
const struct iovec *iov,
unsigned long count,
- loff_t * offset)
+ loff_t *offset)
{
pvfs2_kernel_op_t *op = NULL;
struct qhash_head *hash_link = NULL;
@@ -250,6 +251,7 @@
int32_t magic = 0;
int32_t proto_ver = 0;
uint64_t tag = 0;
+ ssize_t total_returned_size = 0;
/* Either there is a trailer or there isn't */
if (count != notrailer_count && count != (notrailer_count + 1))
@@ -284,6 +286,7 @@
ptr += iov[i].iov_len;
payload_size += iov[i].iov_len;
}
+ total_returned_size = payload_size;
/* these elements are currently 8 byte aligned (8 bytes for (version +
* magic) 8 bytes for tag). If you add another element, either make it 8
@@ -541,7 +544,8 @@
}
dev_req_release(buffer);
- return count;
+ /* if we are called from aio context, just mark that the iocb is completed */
+ return total_returned_size;
}
#ifdef HAVE_COMBINED_AIO_AND_VECTOR
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/dir.c /home/vilayann/pvfs2/src/kernel/linux-2.6/dir.c
--- src/kernel/linux-2.6/dir.c 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/dir.c 2007-03-15 14:45:28.000000000 -0700
@@ -147,8 +147,8 @@
case 0:
token_set = 1;
ino = get_ino_from_handle(dentry->d_inode);
- gossip_debug(GOSSIP_DIR_DEBUG,
- "calling filldir of . with pos = %d\n", pos);
+ gossip_debug(GOSSIP_DIR_DEBUG,
+ "calling filldir of . with pos = %llu\n", llu(pos));
if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0)
{
break;
@@ -160,7 +160,7 @@
token_set = 1;
ino = get_parent_ino_from_dentry(dentry);
gossip_debug(GOSSIP_DIR_DEBUG,
- "calling filldir of .. with pos = %d\n", pos);
+ "calling filldir of .. with pos = %llu\n", llu(pos));
if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0)
{
break;
@@ -282,7 +282,8 @@
file->f_pos = i;
}
gossip_debug(GOSSIP_DIR_DEBUG,
- "pos = %d, file->f_pos should have been %ld\n", pos,
+ "pos = %llu, file->f_pos should have been %ld\n",
+ llu(pos),
(unsigned long) file->f_pos);
}
else
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/downcall.h /home/vilayann/pvfs2/src/kernel/linux-2.6/downcall.h
--- src/kernel/linux-2.6/downcall.h 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/downcall.h 2007-03-15 14:45:29.000000000 -0700
@@ -78,7 +78,6 @@
typedef struct
{
PVFS_ds_position token;
- uint32_t __pad1;
uint64_t directory_version;
uint32_t __pad2;
uint32_t pvfs_dirent_outcount;
@@ -89,7 +88,6 @@
typedef struct
{
PVFS_ds_position token;
- uint32_t __pad1;
uint64_t directory_version;
uint32_t __pad2;
uint32_t pvfs_dirent_outcount;
@@ -146,10 +144,11 @@
typedef struct {
int32_t returned_count;
+ int32_t __pad1;
PVFS_ds_position token;
char key[PVFS_MAX_XATTR_LISTLEN*PVFS_MAX_XATTR_NAMELEN];
int32_t keylen;
- int32_t __pad1;
+ int32_t __pad2;
int32_t lengths[PVFS_MAX_XATTR_LISTLEN];
} pvfs2_listxattr_response_t;
/* the removexattr response is a blank downcall */
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/pvfs2-cache.c /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-cache.c
--- src/kernel/linux-2.6/pvfs2-cache.c 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-cache.c 2007-08-03 23:11:35.000000000 -0700
@@ -203,14 +203,7 @@
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,45 +262,24 @@
{
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");
- }
-}
-
-static void pvfs2_inode_cache_dtor(
- void *old_pvfs2_inode,
- pvfs2_kmem_cache_t * cachep,
- unsigned long flags)
-{
- pvfs2_inode_t *pvfs2_inode = (pvfs2_inode_t *)old_pvfs2_inode;
-
- if (pvfs2_inode && pvfs2_inode->link_target)
- {
- kfree(pvfs2_inode->link_target);
- pvfs2_inode->link_target = NULL;
- }
+ /* Initialize the reader/writer semaphore */
+ init_rwsem(&pvfs2_inode->xattr_sem);
}
static inline void add_to_pinode_list(pvfs2_inode_t *pvfs2_inode)
@@ -330,8 +302,7 @@
{
pvfs2_inode_cache = kmem_cache_create(
"pvfs2_inode_cache", sizeof(pvfs2_inode_t), 0,
- PVFS2_CACHE_CREATE_FLAGS, pvfs2_inode_cache_ctor,
- pvfs2_inode_cache_dtor);
+ PVFS2_CACHE_CREATE_FLAGS, pvfs2_inode_cache_ctor, NULL);
if (!pvfs2_inode_cache)
{
@@ -403,14 +374,7 @@
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));
}
Only in src/kernel/linux-2.6/: pvfs2-cache.c.bak
Only in src/kernel/linux-2.6/: .pvfs2-cache.o.d
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/pvfs2-kernel.h /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-kernel.h
--- src/kernel/linux-2.6/pvfs2-kernel.h 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-kernel.h 2007-08-03 23:11:35.000000000 -0700
@@ -363,7 +363,7 @@
typedef struct
{
PVFS_object_ref refn;
- char *link_target;
+ char link_target[PVFS_NAME_MAX];
/*
* Reading/Writing Extended attributes need to acquire the appropriate
* reader/writer semaphore on the pvfs2_inode_t structure.
Only in /home/vilayann/pvfs2/src/kernel/linux-2.6/: pvfs2.ko
Only in /home/vilayann/pvfs2/src/kernel/linux-2.6/: pvfs2.mod.c
Only in /home/vilayann/pvfs2/src/kernel/linux-2.6/: .pvfs2-mod.c.swp
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/pvfs2-proc.c /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-proc.c
--- src/kernel/linux-2.6/pvfs2-proc.c 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-proc.c 2007-06-19 19:19:09.000000000 -0700
@@ -260,74 +260,190 @@
};
static int min_debug[] = {0}, max_debug[] = {GOSSIP_MAX_DEBUG};
static int min_op_timeout_secs[] = {0}, max_op_timeout_secs[] = {INT_MAX};
+
static ctl_table pvfs2_acache_table[] = {
/* controls acache timeout */
- {1, "timeout-msecs", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &acache_timeout_extra, NULL},
+ {
+ .ctl_name = 1,
+ .procname = "timeout-msecs",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &acache_timeout_extra
+ },
/* controls acache hard limit */
- {2, "hard-limit", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &acache_hard_extra, NULL},
+ {
+ .ctl_name = 2,
+ .procname = "hard-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &acache_hard_extra
+ },
/* controls acache soft limit */
- {3, "soft-limit", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &acache_soft_extra, NULL},
+ {
+ .ctl_name = 3,
+ .procname = "soft-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &acache_soft_extra
+ },
/* controls acache reclaim percentage */
- {4, "reclaim-percentage", NULL, sizeof(int),
- 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &acache_rec_extra, NULL},
+ {
+ .ctl_name = 4,
+ .procname = "reclaim-percentage",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &acache_rec_extra,
+ },
{0}
};
static ctl_table pvfs2_ncache_table[] = {
/* controls ncache timeout */
- {1, "timeout-msecs", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &ncache_timeout_extra, NULL},
+ {
+ .ctl_name = 1,
+ .procname = "timeout-msecs",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &ncache_timeout_extra
+ },
/* controls ncache hard limit */
- {2, "hard-limit", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &ncache_hard_extra, NULL},
+ {
+ .ctl_name = 2,
+ .procname = "hard-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &ncache_hard_extra
+ },
/* controls ncache soft limit */
- {3, "soft-limit", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &ncache_soft_extra, NULL},
+ {
+ .ctl_name = 3,
+ .procname = "soft-limit",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &ncache_soft_extra
+ },
/* controls ncache reclaim percentage */
- {4, "reclaim-percentage", NULL, sizeof(int),
- 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &ncache_rec_extra, NULL},
+ {
+ .ctl_name = 4,
+ .procname = "reclaim-percentage",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &ncache_rec_extra
+ },
{0}
};
static int acache_perf_count = PVFS2_PERF_COUNT_REQUEST_ACACHE;
static int ncache_perf_count = PVFS2_PERF_COUNT_REQUEST_NCACHE;
static ctl_table pvfs2_pc_table[] = {
- {1, "acache", NULL, 4096, 0444, NULL,
- pvfs2_pc_proc_handler, NULL, NULL, &acache_perf_count, NULL},
- {2, "ncache", NULL, 4096, 0444, NULL,
- pvfs2_pc_proc_handler, NULL, NULL, &ncache_perf_count, NULL},
+ {
+ .ctl_name = 1,
+ .procname = "acache",
+ .maxlen = 4096,
+ .mode = 0444,
+ .proc_handler = pvfs2_pc_proc_handler,
+ .extra1 = &acache_perf_count,
+ },
+ {
+ .ctl_name = 2,
+ .procname = "ncache",
+ .maxlen = 4096,
+ .mode = 0444,
+ .proc_handler = pvfs2_pc_proc_handler,
+ .extra1 = &ncache_perf_count
+ },
{0}
};
static ctl_table pvfs2_table[] = {
/* controls debugging level */
- {1, "debug", &gossip_debug_mask, sizeof(int), 0644, NULL,
- &proc_dointvec_minmax, &sysctl_intvec,
- NULL, &min_debug, &max_debug},
+ {
+ .ctl_name = 1,
+ .procname = "debug",
+ .data = &gossip_debug_mask,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &min_debug,
+ .extra2 = &max_debug
+ },
/* operation timeout */
- {2, "op-timeout-secs", &op_timeout_secs, sizeof(int), 0644, NULL,
- &proc_dointvec_minmax, &sysctl_intvec,
- NULL, &min_op_timeout_secs, &max_op_timeout_secs},
+ {
+ .ctl_name = 2,
+ .procname = "op-timeout-secs",
+ .data = &op_timeout_secs,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &min_op_timeout_secs,
+ .extra2 = &max_op_timeout_secs
+ },
/* time interval for client side performance counters */
- {3, "perf-time-interval-secs", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &perf_time_interval_extra, NULL},
+ {
+ .ctl_name = 3,
+ .procname = "perf-time-interval-secs",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &perf_time_interval_extra
+ },
/* time interval for client side performance counters */
- {4, "perf-history-size", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &perf_history_size_extra, NULL},
+ {
+ .ctl_name = 4,
+ .procname = "perf-history-size",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &perf_history_size_extra
+ },
/* reset performance counters */
- {5, "perf-counter-reset", NULL, sizeof(int), 0644, NULL,
- &pvfs2_param_proc_handler, NULL, NULL, &perf_reset_extra, NULL},
+ {
+ .ctl_name = 5,
+ .procname = "perf-counter-reset",
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &pvfs2_param_proc_handler,
+ .extra1 = &perf_reset_extra,
+ },
/* subdir for acache control */
- {6, "acache", NULL, 0, 0555, pvfs2_acache_table},
- {7, "perf-counters", NULL, 0, 0555, pvfs2_pc_table},
+ {
+ .ctl_name = 6,
+ .procname = "acache",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = pvfs2_acache_table
+ },
+ {
+ .ctl_name = 7,
+ .procname = "perf-counters",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = pvfs2_pc_table
+ },
/* subdir for ncache control */
- {8, "ncache", NULL, 0, 0555, pvfs2_ncache_table},
+ {
+ .ctl_name = 8,
+ .procname = "ncache",
+ .maxlen = 0,
+ .mode = 0555,
+ .child = pvfs2_ncache_table
+ },
{0}
};
static ctl_table fs_table[] = {
- {1, "pvfs2", NULL, 0, 0555, pvfs2_table},
+ {
+ .ctl_name = 1,
+ .procname = "pvfs2",
+ .mode = 0555,
+ .child = pvfs2_table
+ },
{0}
};
#endif
@@ -337,7 +453,11 @@
#ifdef CONFIG_SYSCTL
if (!fs_table_header)
{
+#ifdef HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE
fs_table_header = register_sysctl_table(fs_table, 0);
+#else
+ fs_table_header = register_sysctl_table(fs_table);
+#endif
}
#endif
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/pvfs2-utils.c /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-utils.c
--- src/kernel/linux-2.6/pvfs2-utils.c 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/pvfs2-utils.c 2007-08-03 23:11:35.000000000 -0700
@@ -288,17 +288,7 @@
/* copy link target to inode private data */
if (pvfs2_inode && symname)
{
- if (pvfs2_inode->link_target)
- {
- kfree(pvfs2_inode->link_target);
- pvfs2_inode->link_target = NULL;
- }
- pvfs2_inode->link_target = kmalloc(
- (strlen(symname) + 1), PVFS2_GFP_FLAGS);
- if (pvfs2_inode->link_target)
- {
- strcpy(pvfs2_inode->link_target, symname);
- }
+ strncpy(pvfs2_inode->link_target, symname, PVFS_NAME_MAX);
gossip_debug(GOSSIP_UTILS_DEBUG, "Copied attr link target %s\n",
pvfs2_inode->link_target);
}
@@ -1956,7 +1946,7 @@
pvfs2_inode->refn.handle = PVFS_HANDLE_NULL;
pvfs2_inode->refn.fs_id = PVFS_FS_ID_NULL;
pvfs2_inode->last_failed_block_index_read = 0;
- pvfs2_inode->link_target = NULL;
+ memset(pvfs2_inode->link_target, 0, sizeof(pvfs2_inode->link_target));
pvfs2_inode->error_code = 0;
SetInitFlag(pvfs2_inode);
}
@@ -1964,7 +1954,6 @@
/*
this is called from super:pvfs2_destroy_inode.
- pvfs2_inode_cache_dtor frees the link_target if any
*/
void pvfs2_inode_finalize(pvfs2_inode_t *pvfs2_inode)
{
Only in /home/vilayann/pvfs2/src/kernel/linux-2.6/.tmp_versions: pvfs2.mod
diff -aur --exclude '*.o' --exclude '*.cmd' src/kernel/linux-2.6/upcall.h /home/vilayann/pvfs2/src/kernel/linux-2.6/upcall.h
--- src/kernel/linux-2.6/upcall.h 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/src/kernel/linux-2.6/upcall.h 2007-03-15 14:45:29.000000000 -0700
@@ -89,7 +89,6 @@
PVFS_ds_position token;
int32_t max_dirent_count;
int32_t buf_index;
- uint32_t __pad1;
} pvfs2_readdir_request_t;
typedef struct
@@ -99,6 +98,7 @@
int32_t max_dirent_count;
uint32_t mask;
int32_t buf_index;
+ int32_t __pad1;
} pvfs2_readdirplus_request_t;
typedef struct
@@ -158,6 +158,7 @@
{
PVFS_object_ref refn;
int32_t requested_count;
+ int32_t __pad1;
PVFS_ds_position token;
} pvfs2_listxattr_request_t;
diff -aur maint/config/kernel.m4 /home/vilayann/pvfs2/maint/config/kernel.m4
--- maint/config/kernel.m4 2007-04-09 07:54:37.000000000 -0700
+++ /home/vilayann/pvfs2/maint/config/kernel.m4 2007-06-19 19:19:06.000000000 -0700
@@ -15,7 +15,7 @@
NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`"
- CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
+ CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
AC_MSG_CHECKING(for i_size_write in kernel)
@@ -168,6 +168,33 @@
)
fi
+ dnl checking if we have a readv callback in super_operations
+ AC_MSG_CHECKING(for readv callback in struct file_operations in kernel)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ static struct file_operations fop = {
+ .readv = NULL,
+ };
+ ], [],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_READV_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has readv callback),
+ AC_MSG_RESULT(no)
+ )
+ dnl checking if we have a writev callback in super_operations
+ AC_MSG_CHECKING(for writev callback in struct file_operations in kernel)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ static struct file_operations fop = {
+ .writev = NULL,
+ };
+ ], [],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WRITEV_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has writev callback),
+ AC_MSG_RESULT(no)
+ )
+
dnl checking if we have a find_inode_handle callback in super_operations
AC_MSG_CHECKING(for find_inode_handle callback in struct super_operations in kernel)
AC_TRY_COMPILE([
@@ -346,13 +373,41 @@
AC_DEFINE(HAVE_AIO_VFS_SUPPORT, 1, Define if we are enabling VFS AIO support in kernel),
AC_MSG_RESULT(no)
)
+
+ tmp_cflags=$CFLAGS
+ dnl if this test passes, the signature of aio_read has changed to the new one
+ CFLAGS="$CFLAGS -Werror"
+ AC_MSG_CHECKING(for new prototype of aio_read callback of file_operations structure)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ extern ssize_t my_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
+ static struct file_operations fop = {
+ .aio_read = my_aio_read,
+ };
+ ], [],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_AIO_NEW_AIO_SIGNATURE, 1, Define if VFS AIO support in kernel has a new prototype),
+ AC_MSG_RESULT(no)
+ )
+ CFLAGS=$tmp_cflags
+
fi
- dnl we need the compiler to error on warnings about prototypes, but
dnl certain Fedora FC5 kernel header files throw extra (spurious)
- dnl warnings, which -Wno-pointer-sign silences.
- tmp_cflags=$CFLAGS
- CFLAGS="$CFLAGS -Werror -Wno-pointer-sign"
+ dnl warnings, which -Wno-pointer-sign silences, but that option is
+ dnl only supported by gcc-4.
+ if test "x$GCC" = "xyes" ; then
+ AC_MSG_CHECKING(for gcc major version)
+ gcc_version=`$CC --version| head -1 | tr . ' ' | cut -d ' ' -f 3`
+ AC_MSG_RESULT($gcc_version)
+ if test $gcc_version -gt 3 ; then
+ extra_gcc_flags="-Wno-pointer-sign -Wno-strict-aliasing -Wno-strict-aliasing=2"
+ fi
+ fi
+
+ tmp_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -Werror $extra_gcc_flags"
dnl if this test passes, there is a struct dentry* argument
AC_MSG_CHECKING(if statfs callbacks' arguments in kernel has struct dentry argument)
dnl if this test passes, the kernel has it
@@ -591,6 +646,19 @@
AC_MSG_RESULT(no)
)
+ dnl kmem_cache_destroy function may return int only on pre 2.6.19 kernels
+ dnl else it returns a void.
+ AC_MSG_CHECKING(for int return in kmem_cache_destroy)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/slab.h>
+ extern int kmem_cache_destroy(kmem_cache_t *);
+ ], [],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INT_RETURN_KMEM_CACHE_DESTROY, 1, Define if return value from kmem_cache_destroy is type int),
+ AC_MSG_RESULT(no)
+ )
+
dnl more 2.6 api changes. return type for the invalidatepage
dnl address_space_operation is 'void' in new kernels but 'int' in old
dnl I had to turn on -Werror for this test because i'm not sure how
@@ -706,5 +774,19 @@
AC_MSG_RESULT(no)
)
+ dnl Check for two arg register_sysctl_table()
+ AC_MSG_CHECKING(for two arguments to register_sysctl_table)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/sysctl.h>
+ #include <linux/proc_fs.h>
+ ], [
+ register_sysctl_table(NULL, 0);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE, 1, Define if register_sysctl_table takes two arguments),
+ AC_MSG_RESULT(no)
+ )
+
CFLAGS=$oldcflags
])
Only in /home/vilayann/pvfs2/maint/config/: portals.m4
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users