From owner-freebsd-current@FreeBSD.ORG Mon May 26 12:01:58 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B1CA37B401 for ; Mon, 26 May 2003 12:01:58 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 27E0243F3F for ; Mon, 26 May 2003 12:01:57 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 26 May 2003 20:01:56 +0100 (BST) To: current@freebsd.org Date: Mon, 26 May 2003 20:01:56 +0100 From: Ian Dowse Message-ID: <200305262001.aa29972@salmon.maths.tcd.ie> Subject: panic: softdep_disk_io_initiation: read X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2003 19:01:58 -0000 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