Date: Sun, 23 Jan 2005 16:44:31 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Jeremie Le Hen <jeremie@le-hen.org> Cc: freebsd-current@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/md md.c Message-ID: <36877.1106495071@critter.freebsd.dk> In-Reply-To: Your message of "Sun, 23 Jan 2005 16:33:26 %2B0100." <20050123153326.GN36660@obiwan.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20050123153326.GN36660@obiwan.tataz.chchile.org>, Jeremie Le Hen wr ites: >> What kind of filesystem is /boot ? Is it ufs or something else ? > >Yes, it's UFS1. Ok: even more asserts. Please try to find out exactly which one explodes. ==== //depot/user/phk/phk_bufwork/sys/dev/md/md.c#21 - /bang/p4/phk/phk_bufwork/sys/dev/md/md.c ==== @@ -506,16 +506,25 @@ * the data. When writing IO_DIRECT is not optimal. */ if (bp->bio_cmd == BIO_READ) { + mtx_assert(&Giant, MA_OWNED); vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY, curthread); + mtx_assert(&Giant, MA_OWNED); error = VOP_READ(sc->vnode, &auio, IO_DIRECT, sc->cred); + mtx_assert(&Giant, MA_OWNED); VOP_UNLOCK(sc->vnode, 0, curthread); } else { + mtx_assert(&Giant, MA_OWNED); (void) vn_start_write(sc->vnode, &mp, V_WAIT); + mtx_assert(&Giant, MA_OWNED); vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY, curthread); + mtx_assert(&Giant, MA_OWNED); error = VOP_WRITE(sc->vnode, &auio, sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred); + mtx_assert(&Giant, MA_OWNED); VOP_UNLOCK(sc->vnode, 0, curthread); + mtx_assert(&Giant, MA_OWNED); vn_finished_write(mp); + mtx_assert(&Giant, MA_OWNED); } bp->bio_resid = auio.uio_resid; return (error); -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36877.1106495071>