[OpenAFS] 1.5.57 does not load on Linux 2.4
Simon Wilkinson
sxw@inf.ed.ac.uk
Fri, 23 Jan 2009 12:31:04 +0000
--Apple-Mail-6-1003593784
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
On 23 Jan 2009, at 12:08, Axel Reinhold wrote:
> While 1.5.52 did well with Linux 2.4 - since the last four versions
> 1.5.53 and 1.5.56 was no more compiling.
> But 1.5.57 compiles successfully and does not load:
>
> /opt/afs/lib/openafs/libafs-2.4.x-ARX.o: unresolved symbol
> maybe_lock_kernel
> /opt/afs/lib/openafs/libafs-2.4.x-ARX.o: unresolved symbol
> maybe_unlock_kernel
These are new symbols that landed as part of the cache bypass work -
their definition is restricted to 2.6 kernels, but they're used in
builds for 2.4 kernels.
> /opt/afs/lib/openafs/libafs-2.4.x-ARX.o: unresolved symbol vprintf
That's mine. As part of the kernel prototyping work, we switched to
using varargs for debug messages. However, it would appear that the
2.4 kernel doesn't have vprintf support.
The attached patch should, hopefully solve these problems - I don't
have a machine with a 2.4 kernel on it to test with, though, so if
you could give it a go and report back, that would be great!
Thanks,
Simon.
--Apple-Mail-6-1003593784
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name=linux24-fixes
Content-Disposition: attachment;
filename=linux24-fixes
Index: development/openafs/src/afs/LINUX/osi_vnodeops.c
===================================================================
--- development.orig/openafs/src/afs/LINUX/osi_vnodeops.c 2009-01-21 22:15:34.000000000 +0000
+++ development/openafs/src/afs/LINUX/osi_vnodeops.c 2009-01-23 12:29:46.000000000 +0000
@@ -58,7 +58,7 @@
extern struct vcache *afs_globalVp;
extern int afs_notify_change(struct dentry *dp, struct iattr *iattrp);
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX24_ENV)
/* Some uses of BKL are perhaps not needed for bypass or memcache--
* why don't we try it out? */
extern struct afs_cacheOps afs_UfsCacheOps;
@@ -74,7 +74,7 @@
if(afs_cacheType == &afs_UfsCacheOps) \
unlock_kernel(); \
} while(0);
-#endif /* AFS_CACHE_BYPASS */
+#endif /* AFS_LINUX24_ENV */
static ssize_t
afs_linux_read(struct file *fp, char *buf, size_t count, loff_t * offp)
Index: development/openafs/src/rx/rx_kcommon.c
===================================================================
--- development.orig/openafs/src/rx/rx_kcommon.c 2009-01-21 15:16:52.000000000 +0000
+++ development/openafs/src/rx/rx_kcommon.c 2009-01-23 12:29:01.000000000 +0000
@@ -137,7 +137,7 @@
msg = "Unknown AFS panic";
printf(msg, a1, a2, a3);
panic(msg);
-#elif defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)
+#elif (defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)) || (defined(AFS_LINUX22_ENV) && !defined(AFS_LINUX_26_ENV))
char buf[256];
va_list ap;
if (!msg)
--Apple-Mail-6-1003593784--