Skip to contentSkip to conversation

intermezzo fixes for 2.5.50

PATCH In review Peter Braam 5 participants 6 messages Dec 11, 2002 – Dec 14, 2002 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intermezzo fixes for 2.5.50

Hello,

Please find attached relatively straightforward fixes for intermezzo problems in 2.5.50. I think all of them related to:
- two missing headers
- use of timespec instead of time_t.

- Peter -

patches to be applied to specific kernels to get intermezzo working

 fs/intermezzo/dir.c            |    6 
 fs/intermezzo/file.c           |    2 
 fs/intermezzo/journal.c        |   12 +
 fs/intermezzo/kml_reint.c      |   42 +++--
 fs/intermezzo/kml_unpack.c     |   12 +
 fs/intermezzo/presto.c         |    6 
 fs/intermezzo/replicator.c     |    3 
 fs/intermezzo/vfs.c            |    4 
 include/linux/fsfilter.h       |  134 ++++++++++++++++++
 include/linux/intermezzo_fs.h  |    2 
 include/linux/intermezzo_idl.h |  304 +++++++++++++++++++++++++++++++++++++++++
 include/linux/intermezzo_lib.h |  168 ++++++++++++++++++++++
 12 files changed, 663 insertions(+), 32 deletions(-)
fs/intermezzo/dir.c renamed from fs/intermezzo/dir.c~intermezzo +3 -3
@@ -342,7 +342,7 @@ int presto_setattr(struct dentry *de, st
         int error;
         struct presto_cache *cache;
         struct presto_file_set *fset;
-        struct lento_vfs_context info = { 0, 0, 0 };
+        struct lento_vfs_context info = { 0, {0}, 0 };
 
         ENTRY;
 
@@ -358,8 +358,8 @@ int presto_setattr(struct dentry *de, st
         CDEBUG(D_INODE, "valid %#x, mode %#o, uid %u, gid %u, size %Lu, "
                "atime %lu mtime %lu ctime %lu flags %d\n",
                iattr->ia_valid, iattr->ia_mode, iattr->ia_uid, iattr->ia_gid,
-               iattr->ia_size, iattr->ia_atime, iattr->ia_mtime,
-               iattr->ia_ctime, iattr->ia_attr_flags);
+               iattr->ia_size, iattr->ia_atime.tv_sec, iattr->ia_mtime.tv_sec,
+               iattr->ia_ctime.tv_sec, iattr->ia_attr_flags);
         
         if ( presto_get_permit(de->d_inode) < 0 ) {
                 EXIT;
fs/intermezzo/file.c renamed from fs/intermezzo/file.c~intermezzo +1 -1
@@ -61,7 +61,7 @@ extern int presto_permission(struct inod
 
 static int presto_open_upcall(int minor, struct dentry *de)
 {
-        int rc;
+        int rc = 0;
         char *path, *buffer;
         struct presto_file_set *fset;
         int pathlen;
fs/intermezzo/journal.c renamed from fs/intermezzo/journal.c~intermezzo +8 -4
@@ -363,8 +363,10 @@ static inline char *log_dentry_version(c
 
         presto_getversion(&version, dentry->d_inode);
         
-        version.pv_mtime = HTON__u64(version.pv_mtime);
-        version.pv_ctime = HTON__u64(version.pv_ctime);
+        version.pv_mtime_sec = HTON__u32(version.pv_mtime_sec);
+        version.pv_ctime_sec = HTON__u32(version.pv_ctime_sec);
+        version.pv_mtime_nsec = HTON__u32(version.pv_mtime_nsec);
+        version.pv_ctime_nsec = HTON__u32(version.pv_ctime_nsec);
         version.pv_size = HTON__u64(version.pv_size);
 
         return logit(buf, &version, sizeof(version));
@@ -376,8 +378,10 @@ static inline char *log_version(char *bu
 
         memcpy(&version, pv, sizeof(version));
         
-        version.pv_mtime = HTON__u64(version.pv_mtime);
-        version.pv_ctime = HTON__u64(version.pv_ctime);
+        version.pv_mtime_sec = HTON__u32(version.pv_mtime_sec);
+        version.pv_mtime_nsec = HTON__u32(version.pv_mtime_nsec);
+        version.pv_ctime_sec = HTON__u32(version.pv_ctime_sec);
+        version.pv_ctime_nsec = HTON__u32(version.pv_ctime_nsec);
         version.pv_size = HTON__u64(version.pv_size);
 
         return logit(buf, &version, sizeof(version));
fs/intermezzo/kml_reint.c renamed from fs/intermezzo/kml_reint.c~intermezzo +28 -14

114 lines not on this page · raw message

fs/intermezzo/kml_unpack.c renamed from fs/intermezzo/kml_unpack.c~intermezzo +8 -4
@@ -67,8 +67,10 @@ int kml_unpack_version(struct presto_ver
 
 	UNLOGP(*ver, struct presto_version, ptr, end);
         pv = *ver;
-        pv->pv_mtime   = NTOH__u64(pv->pv_mtime);
-        pv->pv_ctime   = NTOH__u64(pv->pv_ctime);
+        pv->pv_mtime_sec   = NTOH__u32(pv->pv_mtime_sec);
+        pv->pv_mtime_nsec   = NTOH__u32(pv->pv_mtime_nsec);
+        pv->pv_ctime_sec   = NTOH__u32(pv->pv_ctime_sec);
+        pv->pv_ctime_nsec   = NTOH__u32(pv->pv_ctime_nsec);
         pv->pv_size    = NTOH__u64(pv->pv_size);
 
 	*buf = ptr;
@@ -247,8 +249,10 @@ static int kml_unpack_setattr(struct kml
 	LUNLOGV(rec->uid, __u32, ptr, end);
 	LUNLOGV(rec->gid, __u32, ptr, end);
 	LUNLOGV(rec->size, __u64, ptr, end);
-	LUNLOGV(rec->mtime, __u64, ptr, end);
-	LUNLOGV(rec->ctime, __u64, ptr, end);
+	LUNLOGV(rec->mtime_sec, __u32, ptr, end);
+	LUNLOGV(rec->mtime_nsec, __u32, ptr, end);
+	LUNLOGV(rec->ctime_sec, __u32, ptr, end);
+	LUNLOGV(rec->ctime_nsec, __u32, ptr, end);
 	LUNLOGV(rec->flags, __u32, ptr, end);
         LUNLOGV(rec->old_mode, __u32, ptr, end);
         LUNLOGV(rec->old_rdev, __u32, ptr, end);
fs/intermezzo/presto.c renamed from fs/intermezzo/presto.c~intermezzo +4 -2
@@ -627,8 +627,10 @@ int presto_put_permit(struct inode * ino
 void presto_getversion(struct presto_version * presto_version,
                        struct inode * inode)
 {
-        presto_version->pv_mtime = (__u64)inode->i_mtime;
-        presto_version->pv_ctime = (__u64)inode->i_ctime;
+        presto_version->pv_mtime_sec = inode->i_mtime.tv_sec;
+        presto_version->pv_mtime_nsec = inode->i_mtime.tv_nsec;
+        presto_version->pv_ctime_sec = inode->i_ctime.tv_sec;
+        presto_version->pv_ctime_nsec = inode->i_ctime.tv_nsec;
         presto_version->pv_size  = (__u64)inode->i_size;
 }
 
fs/intermezzo/replicator.c renamed from fs/intermezzo/replicator.c~intermezzo +2 -1
@@ -29,7 +29,8 @@
 #include <asm/uaccess.h>
 
 #include <linux/errno.h>
-
+#include <linux/fs.h>
+#include <linux/fsfilter.h>
 #include <linux/intermezzo_fs.h>
 
 /*
fs/intermezzo/vfs.c renamed from fs/intermezzo/vfs.c~intermezzo +2 -2
@@ -186,7 +186,7 @@ inline void presto_debug_fail_blkdev(str
 
         if (errorval && errorval == (long)value && !is_read_only(dev)) {
                 CDEBUG(D_SUPER, "setting device %s read only\n", kdevname(dev));
-                BLKDEV_FAIL(dev, 1);
+                BLKDEV_FAIL(kdev_val(dev), 1);
                 izo_channels[minor].uc_errorval = -kdev_val(dev);
         }
 }
@@ -475,7 +475,7 @@ int lento_setattr(const char *name, stru
                name, iattr->ia_valid, iattr->ia_mode, iattr->ia_uid,
                iattr->ia_gid, iattr->ia_size);
         CDEBUG(D_PIOCTL, "atime %#lx, mtime %#lx, ctime %#lx, attr_flags %#x\n",
-               iattr->ia_atime, iattr->ia_mtime.tv_sec, iattr->ia_ctime.tv_sec,
+               iattr->ia_atime.tv_sec, iattr->ia_mtime.tv_sec, iattr->ia_ctime.tv_sec,
                iattr->ia_attr_flags);
         CDEBUG(D_PIOCTL, "offset %d, recno %d, flags %#x\n",
                info->slot_offset, info->recno, info->flags);
include/linux/fsfilter.h new file +134 -0

134 lines not on this page · raw message

include/linux/intermezzo_fs.h renamed from include/linux/intermezzo_fs.h~intermezzo +1 -1
@@ -39,7 +39,7 @@ typedef __u8 uuid_t[16];
 
 struct lento_vfs_context {
         __u64 kml_offset;
-        __u64 updated_time;
+        struct timespec updated_time;
         __u64 remote_ino;
         __u64 remote_generation;
         __u32 slot_offset;
include/linux/intermezzo_idl.h new file +304 -0

304 lines not on this page · raw message

include/linux/intermezzo_lib.h new file +168 -0

168 lines not on this page · raw message

_

#1 lore raw

On Wed, 11 Dec 2002, Peter Braam wrote:

| Hello,
|
| Please find attached relatively straightforward fixes for intermezzo
| problems in 2.5.50.  I think all of them related to:
|  - two missing headers
|  - use of timespec instead of time_t.
|
| - Peter -

Patch doesn't apply cleanly to 2.5.51.
File include/linux/fsfilter.h is already in 2.5.51.

After ingoring above: intermezzo doesn't build. Makefile still contains io_daemon.o, but that should be deleted.

Patch for that is below.

Signature · 15 lines
~Randy



--- ./fs/intermezzo/Makefile%IMZ	Mon Dec  9 18:46:14 2002
+++ ./fs/intermezzo/Makefile	Wed Dec 11 11:40:55 2002
@@ -5,7 +5,7 @@
 obj-$(CONFIG_INTERMEZZO_FS) += intermezzo.o

 intermezzo-objs := cache.o dcache.o dir.o ext_attr.o file.o fileset.o \
-	           inode.o io_daemon.o journal.o journal_ext2.o journal_ext3.o \
+	           inode.o journal.o journal_ext2.o journal_ext3.o \
 	           journal_obdfs.o journal_reiserfs.o journal_tmpfs.o journal_xfs.o \
 	           kml_reint.o kml_unpack.o methods.o presto.o psdev.o replicator.o \
 	           super.o sysctl.o upcall.o vfs.o

A message that is not in the archive (sent off-list or not yet received): [email protected] .net

#3 lore raw

Problems compiling 2.4.20 - fail just in 'make' - please help

My gcc compiler:

server01:/usr/src/linux-2.4.20# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.2 20021202 (Debian prerelease)

------- the fail --------

server01:/usr/src/linux-2.4.20# make
gcc -D__KERNEL__ -I/usr/src/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   -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr/src/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  -DUTS_MACHINE='"i386"' -DKBUILD_BASENAME=version -c -o init/version.o init/version.c
gcc -D__KERNEL__ -I/usr/src/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   -DKBUILD_BASENAME=do_mounts -c -o init/do_mounts.o init/do_mounts.c
make CFLAGS="-D__KERNEL__ -I/usr/src/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 " -C  kernel
make[1]: Entering directory `/usr/src/linux-2.4.20/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.20/kernel'
gcc -D__KERNEL__ -I/usr/src/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   -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched  -fno-omit-frame-pointer -c -o sched.o sched.c
In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.20/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.20/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.20/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.20/include/linux/mm.h:4,
                 from sched.c:23:
/usr/src/linux-2.4.20/include/linux/kernel.h:10:20: stdarg.h: No such file or directory
In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.20/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.20/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.20/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.20/include/linux/mm.h:4,
                 from sched.c:23:
/usr/src/linux-2.4.20/include/linux/kernel.h:74: parse error before "va_list"
/usr/src/linux-2.4.20/include/linux/kernel.h:74: warning: function declaration isn't a prototype
/usr/src/linux-2.4.20/include/linux/kernel.h:77: parse error before "va_list"
/usr/src/linux-2.4.20/include/linux/kernel.h:77: warning: function declaration isn't a prototype
/usr/src/linux-2.4.20/include/linux/kernel.h:81: parse error before "va_list"
/usr/src/linux-2.4.20/include/linux/kernel.h:81: warning: function declaration isn't a prototype
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.20/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20/kernel'
make: *** [_dir_kernel] Error 2
server01:/usr/src/linux-2.4.20#

???????

#4 lore raw

Same with Linux 2.4.20-ac2 <-> Re: Problems compiling 2.4.20 - fail just in 'make' - please help

Same problem with Linux 2.4.20-ac2

I think its not a kernel code problem. Have any some idea about the real one? Any compatibility problem with gcc3.2.2 in variable use?

BTW: special warning with:
-> /usr/src/linux-2.4.20/include/linux/kernel.h:10:20: stdarg.h: No such file or directory

Quoted 80 lines · At 21:11 11/12/2002 +0100, [email protected] wrote:

My gcc compiler:

server01:/usr/src/linux-2.4.20# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared 
--with-system-zlib --enable-nls --without-included-gettext 
--enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm 
--enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.2 20021202 (Debian prerelease)

------- the fail --------

server01:/usr/src/linux-2.4.20# make
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes 
(quoted diff) +0 -3
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i686   -DKBUILD_BASENAME=main -c 
-o init/main.o init/main.c

. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes

(quoted diff) +0 -3
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i686  -DUTS_MACHINE='"i386"' 
-DKBUILD_BASENAME=version -c -o init/version.o init/version.c

gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes

(quoted diff) +0 -3
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 
-march=i686   -DKBUILD_BASENAME=do_mounts -c -o init/do_mounts.o 

init/do_mounts.c
make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall

(quoted diff) +0 -3
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 " 
-C  kernel

make[1]: Entering directory `/usr/src/linux-2.4.20/kernel' make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.20/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20/include -Wall -Wstrict-prototypes

(quoted diff) +0 -2
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-pipe -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix 

include -DKBUILD_BASENAME=sched -fno-omit-frame-pointer -c -o sched.o sched.c In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,

                 from /usr/src/linux-2.4.20/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.20/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.20/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.20/include/linux/mm.h:4,
                 from sched.c:23:
/usr/src/linux-2.4.20/include/linux/kernel.h:10:20: stdarg.h: No such file or directory
In file included from /usr/src/linux-2.4.20/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.20/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.20/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.20/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.20/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.20/include/linux/mm.h:4,
                 from sched.c:23:

/usr/src/linux-2.4.20/include/linux/kernel.h:74: parse error before "va_list" /usr/src/linux-2.4.20/include/linux/kernel.h:74: warning: function declaration isn't a prototype /usr/src/linux-2.4.20/include/linux/kernel.h:77: parse error before "va_list" /usr/src/linux-2.4.20/include/linux/kernel.h:77: warning: function declaration isn't a prototype /usr/src/linux-2.4.20/include/linux/kernel.h:81: parse error before "va_list" /usr/src/linux-2.4.20/include/linux/kernel.h:81: warning: function declaration isn't a prototype make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.20/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20/kernel'
make: *** [_dir_kernel] Error 2
server01:/usr/src/linux-2.4.20#

???????

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw

Re: Same with Linux 2.4.20-ac2 <-> Re: Problems compiling 2.4.20 - fail just in 'make' - please help

Quoted 9 lines · On Wed, 2002-12-11 at 21:33, [email protected] wrote:

Same problem with Linux 2.4.20-ac2

I think its not a kernel code problem. Have any some idea about the real one? Any compatibility problem with gcc3.2.2 in variable use?

BTW: special warning with:
-> /usr/src/linux-2.4.20/include/linux/kernel.h:10:20: stdarg.h: No such file or directory

You appear to be missing compiler headers from gcc

#6 lore raw

Re: [PATCH] intermezzo update

In reply to Peter Braam

Applied (after fixups), but I also moved the intermezzo header files into intermezzo's own directory instead of leaving them in <linux/*.h>. I don't see why anybody else should care about intermezzo-specific stuff.

Btw, the thing still doesn't actually compile, since there is no io_deamon file checked in, even though the makefile says it wants one.

Linus