Re: Kernel panic: 2.1.121 with SCSI DAT drive

Kai M{kisara (makisara@metla.fi)
Tue, 15 Sep 1998 23:07:11 +0300 (EET DST)


On Tue, 15 Sep 1998, Kai M{kisara wrote:

> On 14 Sep 1998, Philippe Troin wrote:
> ...
> > Plus if I try to dump some filesystems, the dump process hanges on
> > down_failed forever:
> >
> > 100 0 367 366 0 0 1028 608 wait4 S p2 0:02 dump
> > 140 0 368 367 0 0 1052 660 unix_data_w S p2 0:00 dump
> > 44 0 369 368 0 0 0 0 do_exit Z p2 0:00 dump
> > 44 0 370 368 0 0 0 0 down_failed DW p2 0:00 (dump)
> > 40 0 371 368 0 0 1028 616 down_failed D p2 0:00 dump
> >
> This sounds like the problem some people encounter but I have never been
> able to reconstruct (I will try again tonight with dump). The process is
> hanging at down() which probably means that the tape driver is waiting for
> the previously sent SCSI command to finish. There are at least the
> following two possibilities:
> 1. There is a bug in the tape driver so that it will never call up() or
> the SCSI interrupt is lost, or

There was a bug caused by moving some things from the release() function
to the new flush() function. Flush is called every time the file is closed
but it should not do anything until the last call. The following patch
fixes the bug:
----------------------------8<------------------------------------------
--- /source/linux/drivers/scsi/st.c Tue Sep 15 22:28:23 1998
+++ linux/drivers/scsi/st.c Tue Sep 15 22:44:22 1998
@@ -890,6 +890,9 @@
kdev_t devt = inode->i_rdev;
int dev;

+ if (filp->f_count > 1)
+ return 0;
+
dev = TAPE_NR(devt);
STp = &(scsi_tapes[dev]);
STm = &(STp->modes[STp->current_mode]);
----------------------------8<------------------------------------------

Thanks for the report.

Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/