[linux-cifs-client] Re: cifs version 1.42 available for testing

Juan José Villaplana Querol villapla at si.uji.es
Fri May 26 10:33:58 GMT 2006


> I have created a converged cifs 1.42 source tarball (ie current cifs) 
> which should build and work on (roughly) 2.6.8 or later kernels.  This 
> is only slightly beyond what was tested at Connectathon a few weeks 
> ago.  Obviously I don't have every possible kernel version between 2.6.8 
> and 2.6.16-rc5 to try this on but I have built and lightly tested on a 
> few different kernel versions today (which went fine) to ensure that the 
> new ifdefs do take care of the global kernel changes for each major 
> kernel version.  I ran out of time today to back port it all the way 
> back to 2.6.5 (SLES9) but will try to finish that up later.   There are 
> a surprisingly number of little differences in the vfs between Linux 
> kernel versions.
> 
> On the website I would like to keep just two versions of cifs code going 
> forward (instead of various distinct ones for various old kernels)
>     a) cifs-2.6.git (the current development branch) which gets pulled 
> automatically into -mm (no ifdefs for kernel versions per typical kernel 
> style)
>     b) the version with the various ifdefs to allow it to build on lots 
> of different kernel versions from 2.6.5 through 2.6.15, or whatever the 
> previous kernel version is
> 
> Obviously this is in addition to the the mainline 2.6 linux kernel 
> itself (which gets updated somewhat less frequently from the cifs devel 
> branch.  I will try to keep these synced reasonably up to date in Samba 
> svn (linux-cifs-client project) as well but git will be the main repository.
>    
> To build this:
>     1) download http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.42.tar.gz
>     2) untar it (e.g. gunzip cifs-1.42.tar.gz then tar -xvf cifs-1.42.tar)
>     3) cd to the root of your kernel's build directory (e.g. 
> /usr/src/<kernel-ver>
>     4) make M=~/cifs-1.42-scratch/fs/cifs
>     5) /sbin/insmod  ~/cifs-1.42-scratch/fs/cifs/cifs.ko
>     6) if you test it and like this version, back up your 
> /lib/modules/<kernel-version>/kernel/fs/cifs/cifs.ko file and replace it 
> with the newly built one
> 
> If this works or doesn't work let me know.

Hi Steve,

The attached patch is needed in order to compile 1.42b on
RHEL4/Centos4. Redhat uses kernel 2.6.9, but provides "kzalloc".


In order to avoid warnings compiling link.c:

  CC [M]  /home/devel/cifs/cifs-1.42b/fs/cifs/link.o
/home/devel/cifs/cifs-1.42b/fs/cifs/link.c: In function `cifs_follow_link':
/home/devel/cifs/cifs-1.42b/fs/cifs/link.c:157: warning: return makes integer from pointer without a cast

it seems that, in function cifs_follow_link line 92, kernel 2.6.8 should
be checked instead of kernel 2.6.12. Is this correct?


Regards,
             Juanjo

-- 
Juan Jose Villaplana Querol/Servei d'Informatica/Universitat Jaume I
-------------- next part --------------
--- Makefile.orig	2006-04-05 23:29:14.000000000 +0200
+++ Makefile	2006-05-25 15:19:56.000000000 +0200
@@ -3,4 +3,9 @@
 #
 obj-$(CONFIG_CIFS) += cifs.o
 
+rhel4 := $(shell grep " release 4" /etc/redhat-release 2> /dev/null)
+ifneq ($(strip $(rhel4)),)
+CFLAGS += -DRHEL4
+endif
+
 cifs-objs := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o md4.o md5.o cifs_unicode.o nterr.o xattr.o cifsencrypt.o fcntl.o readdir.o ioctl.o ntlmssp.o
--- cifsfs.c.orig	2006-03-31 05:51:14.000000000 +0200
+++ cifsfs.c	2006-05-25 14:40:38.000000000 +0200
@@ -170,7 +170,7 @@
 	return;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16) && ! defined RHEL4
 void * kzalloc(size_t size, unsigned flgs)
 {
 	void * buf;
--- cifsproto.h.orig	2006-03-31 05:51:14.000000000 +0200
+++ cifsproto.h	2006-05-25 14:53:23.000000000 +0200
@@ -349,7 +349,7 @@
 		const struct nls_table *nls_codepage, int remap_special_chars);
 extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon,
                 const int netfid, __u64 * pExtAttrBits, __u64 *pMask);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16) && ! defined RHEL4
 extern void * kzalloc(size_t size, unsigned flgs);
 #endif
 #endif			/* _CIFSPROTO_H */


More information about the linux-cifs-client mailing list