I finally made some time to upgrade coda from 6.0.11 to 6.0.12 and the
kernel module from 6.1 to 6.2.   

        I'm building the 6.2 version of the coda module against a Redhat AS3
kernel (a patched 2.4.21 kernel).  upcall.c has some new functions:
block_signals and unblock_signals.  These make use of
&current->sigmask_lock.  For some reason that I can't make out, redhat
has patched sigmask_lock out of the kernel.  It is replaced with
sighand->siglock.  Patching upcall.c to change each occurrence got me to
the next stumbling block.

        upcall.c:672: structure has no member named `uc_posttime'

        This line refers to the upc_req structure, which doesn't have
uc_posttime.  

        It seemed to me (and please check me on this) that uc_posttime was only
ever used in a debug function.  So I deleted all references to it.  And
that got me to the next problem.

upcall.c: In function `block_signals':
upcall.c:642: too many arguments to function
`recalc_sigpending_Rfb6af58d'
upcall.c: In function `unblock_signals':
upcall.c:650: too many arguments to function
`recalc_sigpending_Rfb6af58d'
upcall.c: In function `coda_upcall':
upcall.c:791: too many arguments to function `coda_waitfor_upcall'

        To fix the second error I changed this line:

runtime = coda_waitfor_upcall(req, vcommp);

        to

runtime = coda_waitfor_upcall(req);

        but since I don't understand what it was meant to do, I'm very worried
that I might have broken something.  

        Finally, it appears that recalc_sigpending doesn't take an argument (I
guess it assumes &current).  I don't know if this is redhat specific or
not.  

        I've attached the patch file that I needed to get everything to build.
I've also attached the spec file I used to create an rpm.  I haven't
installed or tested the rpm yet pending word on the my patches.

        And updating the rest of coda is going to have to wait a little bit
now...

Thanks,

-- 
Patrick Walsh
eSoft Incorporated
303.444.1600 x3350
http://www.esoft.com/
-- 
Patrick Walsh
eSoft Incorporated
303.444.1600 x3350
http://www.esoft.com/
diff -u -r linux-coda-6.2/linux2.4/upcall.c linux-coda-6.2-mod/linux2.4/upcall.c
--- linux-coda-6.2/linux2.4/upcall.c	2005-09-29 12:12:29.000000000 -0600
+++ linux-coda-6.2-mod/linux2.4/upcall.c	2005-09-29 12:13:05.000000000 -0600
@@ -631,7 +631,7 @@
  */
 static void block_signals(sigset_t *old)
 {
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sighand->siglock);
 	*old = current->blocked;
 
 	sigfillset(&current->blocked);
@@ -639,16 +639,16 @@
 	sigdelset(&current->blocked, SIGSTOP);
 	sigdelset(&current->blocked, SIGINT);
 
-	recalc_sigpending(current);
-	spin_unlock_irq(&current->sigmask_lock);
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
 }
 
 static void unblock_signals(sigset_t *old)
 {
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sighand->siglock);
 	current->blocked = *old;
-	recalc_sigpending(current);
-	spin_unlock_irq(&current->sigmask_lock);
+	recalc_sigpending();
+	spin_unlock_irq(&current->sighand->siglock);
 }
 
 /* Don't allow signals to interrupt the following upcalls before venus
@@ -669,8 +669,6 @@
 	sigset_t old;
 	int blocked;
 
-	vmp->uc_posttime = jiffies;
-
 	if (coda_upcall_timestamping)
 		do_gettimeofday(&begin);
 
@@ -790,11 +788,11 @@
 	 * ENODEV.  */
 
 	/* Go to sleep.  Wake up on signals only after the timeout. */
-	runtime = coda_waitfor_upcall(req, vcommp);
+	runtime = coda_waitfor_upcall(req);
 	coda_upcall_stats(((union inputArgs *)buffer)->ih.opcode, runtime);
 
 	CDEBUG(D_TIMING, "opc: %d time: %ld uniq: %d size: %d\n",
-	       req->uc_opcode, jiffies - req->uc_posttime, 
+	       req->uc_opcode, jiffies, 
 	       req->uc_unique, req->uc_outSize);
 	CDEBUG(D_UPCALL, 
 	       "..process %d woken up by Venus for req at %p, data at %p\n", 
Only in linux-coda-6.2-mod/linux2.4: .upcall.c.swp
%define kernver 2.4.21

Summary: Coda distributed filesystem, kernel module
Name: linux-coda
Version: 6.2
Release: esoft.11
Source: linux-coda-%{version}.tgz
Patch1: linux-coda-redhat.patch
Copyright: CMU
Group: Base/Kernel
Requires: kernel = %{kernver}-%{release}
BuildRoot: %{_tmppath}/%{name}-root
Obsoletes: coda-fs-module
%description
This package solely contains the kernel module for the Coda filesystem.
 
%prep
%setup
%patch1 -p1

%build
KVER=%{kernver}-%{release}
cd linux2.4
make KVER=%{kernver}-%{release}

%install
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernver}-%{release}/kernel/fs/coda
/bin/cp linux2.4/coda.o 
$RPM_BUILD_ROOT/lib/modules/%{kernver}-%{release}/kernel/fs/coda


%post
depmod -ae

%files
/lib/modules/%{kernver}-%{release}/kernel/fs/coda/coda.o

%changelog
* Thu Sep 29 2005 Patrick Walsh <[EMAIL PROTECTED]>
- adjusted to work with new 6.2 build
* Mon Jun 02 1997 Peter Braam <[EMAIL PROTECTED]>
- small changes to Elliots improvements.
- some of his ideas are now in the scripts
* Wed May 28 1997 Elliot Lee <[EMAIL PROTECTED]>
- Based upon 4.0.3-1 spec file.
- Changed to BuildRoot
- Do as much as possible at build time instead of in %post
- Added initscript for venus
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to