summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2003-05-28 13:22:10 +0000
committeriedowse <iedowse@FreeBSD.org>2003-05-28 13:22:10 +0000
commit0253303b1a9492157c6a61289bfbba04e40854b8 (patch)
treec43215f7526fa67526861f9c7ed988fb1a9c296b /sys/kern/vfs_cluster.c
parentaa5288f4052f9dea1a815487d1933311df0c1b16 (diff)
downloadFreeBSD-src-0253303b1a9492157c6a61289bfbba04e40854b8.zip
FreeBSD-src-0253303b1a9492157c6a61289bfbba04e40854b8.tar.gz
In cluster_wbuild(), initialise b_iocmd to BIO_WRITE before calling
buf_start() to avoid triggering a panic in softdep_disk_io_initiation() if b_iocmd happened to be BIO_READ. The later initialisation of b_iocmd in cluster_wbuild() could probably be moved to before the buf_start() call, but this patch keeps the change as simple as possible. This is reported to fix occasional "softdep_disk_io_initiation: read" panics, especially on NFS servers. Reported by: Nick Hilliard <nick@netability.ie> Tested by: Nick Hilliard <nick@netability.ie> Approved by: re (rwatson)
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 3f9437c..85fb8b3 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -910,8 +910,10 @@ cluster_wbuild(vp, size, start_lbn, len)
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
OpenPOWER on IntegriCloud