Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 May 2003 20:01:56 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        current@freebsd.org
Subject:   panic: softdep_disk_io_initiation: read
Message-ID:  <200305262001.aa29972@salmon.maths.tcd.ie>

next in thread | raw e-mail | index | archive | help

A few people have reported this panic when softdep_disk_io_initiation()
is called via buf_start() from cluster_wbuild(). It seems that
softdep_disk_io_initiation() expects b_iocmd to be initialised
before it is called, but cluster_wbuild() doesn't do this.

I think it should be safe to just initialise b_iocmd before calling
buf_start() as in the patch below. Could somebody who can reproduce
this panic try the patch to see if it helps?

The initialisation of all the fields in `tbp' could possibly be
moved earlier, but I haven't looked carefully enough at the code
to tell if that would break anything else.

Ian

Index: sys/kern/vfs_cluster.c
===================================================================
RCS file: /dump/FreeBSD-CVS/src/sys/kern/vfs_cluster.c,v
retrieving revision 1.137
diff -u -r1.137 vfs_cluster.c
--- sys/kern/vfs_cluster.c	20 Apr 2003 07:29:50 -0000	1.137
+++ sys/kern/vfs_cluster.c	26 May 2003 18:16:01 -0000
@@ -910,8 +910,10 @@
 				splx(s);
 			} /* end of code for non-first buffers only */
 			/* check for latent dependencies to be handled */
-			if ((LIST_FIRST(&tbp->b_dep)) != NULL)
+			if ((LIST_FIRST(&tbp->b_dep)) != NULL) {
+				tbp->b_iocmd = BIO_WRITE;
 				buf_start(tbp);
+			}
 			/*
 			 * If the IO is via the VM then we do some
 			 * special VM hackery (yuck).  Since the buffer's





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305262001.aa29972>