Greetings, linux-tape folks,

[NOTE: I still don't have confirmation on my subscription to the
linux-tape list, so please cc me in replies.]

A short summary:

I wanted to compile ftape 4.03pre2 with the Linux 2.2.1 kernel. The
compilation died with this error while trying to compile `fdc-io.c'

   fdc-io.c: In function `fdc_interrupt_wait':
   fdc-io.c:433: structure has no member named `timeout'
   fdc-io.c:454: structure has no member named `timeout'
   make[2]: *** [fdc-io.o] Error 1
   make[2]: Leaving directory `/usr/src/modules/ftape-4.03pre2/ftape/lowlevel'
   make[1]: *** [modules] Error 2
   make[1]: Leaving directory `/usr/src/modules/ftape-4.03pre2/ftape'
   make: *** [all] Error 2

The variable structure trying to read `timeout' is current->timeout

This is truly a show-stopper bug, so I decided to see what I could 
discover.

THE LONGER REPORT

After my first post about the problem, Perry Gilfillan <[EMAIL PROTECTED]>
replied by telling me that a few others had been having troubles. He
pointed me as far as linux/include/asm-i386/current.h which sets up
current as `struct task_struct' 

With some further digging I found that linux/include/linux/sched.h
sets up the `struct task_struct' I had a 2.0.x copy of sched.h sitting 
around and found the presence of `timeout'.

Next step was to find out where it went. So I dug through the kernel
patch browser and found this entry in the patch-2.1.127 file.

=-=-=-=-=-=-=-=-=-=-=-
patch-2.1.127 linux/include/linux/sched.h

Date: Sat Nov  7 11:31:11 1998
=-=-=-=-=-=-=-=-=-=-=-
diff -u --recursive --new-file v2.1.126/linux/include/linux/sched.h 
linux/include/linux/sched.h
@@ -119,9 +119,10 @@
 extern void show_state(void);
 extern void trap_init(void);
 
+#define        MAX_SCHEDULE_TIMEOUT    LONG_MAX
+extern signed long FASTCALL(schedule_timeout(signed long timeout));
 asmlinkage void schedule(void);
 
-
 /*
  * Open file table structure
  */
@@ -258,7 +259,7 @@
        struct task_struct **tarray_ptr;
 
        struct wait_queue *wait_chldexit;       /* for wait4() */
-       unsigned long timeout, policy, rt_priority;
+       unsigned long policy, rt_priority;
        unsigned long it_real_value, it_prof_value, it_virt_value;
        unsigned long it_real_incr, it_prof_incr, it_virt_incr;
        struct timer_list real_timer;
@@ -348,7 +349,7 @@
 /* pidhash */  NULL, NULL, \
 /* tarray */   &amp;task[0], \
 /* chld wait */        NULL, \
-/* timeout */  0,SCHED_OTHER,0,0,0,0,0,0,0, \
+/* timeout */  SCHED_OTHER,0,0,0,0,0,0,0, \
 /* timer */    { NULL, NULL, 0, 0, it_real_fn }, \
 /* utime */    {0,0,0,0},0, \
 /* per CPU times */ {0, }, {0, }, \
@@ -457,7 +458,10 @@
 
 extern void FASTCALL(__wake_up(struct wait_queue ** p, unsigned int mode));
 extern void FASTCALL(sleep_on(struct wait_queue ** p));
+extern void FASTCALL(sleep_on(struct wait_queue ** p));
 extern void FASTCALL(interruptible_sleep_on(struct wait_queue ** p));
+extern long FASTCALL(interruptible_sleep_on_timeout(struct wait_queue ** p,
+                                                   signed long timeout));
 extern void FASTCALL(wake_up_process(struct task_struct * tsk));
 
 #define wake_up(x)                     __wake_up((x),TASK_UNINTERRUPTIBLE | 
TASK_INTERRUPTIBLE)
=-=-=-=-=-=-=-=-=-=-

That tracks down the change. So that would mean that anyone trying to
compile ftape with 2.1.127 and after would have hit the compilation
error.

The last thing I did was to see if there was any indication why the
file was changed. I found this in the patch summary files on 
www.linuxhq.com ...

=-=-=-=-=-=-=-=-=-=-
Ok,

after two fairly hectic weeks for me, 2.1.127 is finally out there. 

This kernel does:

 various small but important networking fixes from Davem (thanks). One
   of them is the "anti-nagle" bit to allow programs that know what they
   are doing to avoid nagling by telling the kernel so. This is mainly
   things like Web servers and ftp-servers that can use this option
   together with "sendfile()".
 scheduling timeout interface change: the new interface is much more
   logical than the old one, and allows us to get the jiffies wrap-around
   case right. Thanks to Andrea Arcangeli.
 various driver updates: specialix, sonycd, 
 Memory management fixups. Handle out-of-memory conditions correctly,
   and handle high memory load much more gracefully.
 sparc and PowerPC architecture updates
 3c509 SMP fix, tlan PCI probe update.
 scsi driver updates: ncr53c8xx, aic7xxx, dc390
 filesystem updates: autofs, hfs, umsdos

Go, test, be happy,

                Linus
=-=-=-=-=-=-=-=-=-=-=-

It looks like the second point is the important one about the
scheduling timeout interface change. I have hit the extent of my
kernel hacking knowledge (actually I exceeded it a long time ago) I
think this narrows down where the problem resides, but I have no clue
as to how to fix it. A glance at the linux/kernel/sched.c shows there
are some routines there that might be helpful. But as I have said, I
don't know much about either ftape or the kernel.

I hope this helps.

David

mailto:[EMAIL PROTECTED]


Reply via email to