Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 2004 14:51:57 +0100
From:      Steven Smith <sos22@cantab.net>
To:        Doug White <dwhite@gumbysoft.com>
Cc:        Nehal <nehalmistry@gmx.net>
Subject:   Re: Syncer giving up on buffers for ext2fs
Message-ID:  <20040823135157.GA31838@archibold.chu.cam.ac.uk>
In-Reply-To: <20040822194126.T94593@carver.gumbysoft.com>
References:  <20040821174133.00007d48@nehal> <20040822194126.T94593@carver.gumbysoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040823135157.GA31838>