1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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)
This commit is contained in:
Ian Dowse 2003-05-28 13:22:10 +00:00
parent aee2eba2d1
commit ad6adb4f18
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115365

View File

@ -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