From owner-freebsd-current@FreeBSD.ORG Mon Aug 23 13:50:07 2004 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 2621216A4CE for ; Mon, 23 Aug 2004 13:50:07 +0000 (GMT) Received: from ppsw-3.csi.cam.ac.uk (ppsw-3.csi.cam.ac.uk [131.111.8.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 937BA43D45 for ; Mon, 23 Aug 2004 13:50:06 +0000 (GMT) (envelope-from sos22@cantab.net) Received: from archibold.chu.cam.ac.uk ([131.111.131.102]:50598) by ppsw-3.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.153]:25) with smtp (Exim 4.34) id 1BzFD0-0005b0-HB (return-path sos22@cantab.net); Mon, 23 Aug 2004 14:50:02 +0100 Received: by archibold.chu.cam.ac.uk (sSMTP sendmail emulation); Mon, _d Aug 2004 14:51:57 +0100 Date: Mon, 23 Aug 2004 14:51:57 +0100 From: Steven Smith To: Doug White Message-ID: <20040823135157.GA31838@archibold.chu.cam.ac.uk> References: <20040821174133.00007d48@nehal> <20040822194126.T94593@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qlTNgmc+xy1dBmNv" Content-Disposition: inline In-Reply-To: <20040822194126.T94593@carver.gumbysoft.com> X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned cc: freebsd-current@freebsd.org cc: sos22@srcf.ucam.org cc: Nehal Subject: Re: Syncer giving up on buffers for ext2fs 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, 23 Aug 2004 13:50:07 -0000 --qlTNgmc+xy1dBmNv Content-Type: multipart/mixed; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > > the bug 'Syncer "giving up" on buffers and ext2 filesystems' > > (PR kern/56675 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/56675) > > has existed for almost a year, and i have tested in a recent > > snapshot (18th August) and it still exists, will this bug be fixed > > for 5.3? seems to be quite an important bug. > It would be nice if someone could come up with a patch, even a quick one. Well, the attached seems to solve the problem for me, but I'm not convinced that it doesn't create other ones elsewhere. Steven Smith, sos22@cantab.net --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="shutdown.diff" Content-Transfer-Encoding: quoted-printable Index: kern_shutdown.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v retrieving revision 1.163 diff -u -r1.163 kern_shutdown.c --- kern_shutdown.c 15 Aug 2004 19:17:23 -0000 1.163 +++ kern_shutdown.c 23 Aug 2004 13:45:23 -0000 @@ -285,6 +285,15 @@ waittime =3D 0; =20 sync(&thread0, NULL); + + /* SOS22: Moved this to before the sync stage so that + ext2 unmounts cleanly when we're shutting down. I + don't know whether this is actually safe, but it + does appear to solve the problem without doing + anything obviously bad. */ + if (panicstr =3D=3D 0) { + vfs_unmountall(); + } =20 /* * With soft updates, some buffers that are --0F1p//8PRICkK4MW-- --qlTNgmc+xy1dBmNv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBKfZ8O4S8/gLNrjcRAov2AKCYRcTYDypa9NiXn0N7m2BX1VPUwQCgvhsK gecQgrU8+0Q7swyFn9ez/UI= =tQtj -----END PGP SIGNATURE----- --qlTNgmc+xy1dBmNv--