From owner-cvs-all Mon Mar 1 20: 4:49 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 7167814BF3; Mon, 1 Mar 1999 20:04:47 -0800 (PST) (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id UAA27314; Mon, 1 Mar 1999 20:04:31 -0800 (PST) (envelope-from mckusick@FreeBSD.org) Message-Id: <199903020404.UAA27314@freefall.freebsd.org> From: Kirk McKusick Date: Mon, 1 Mar 1999 20:04:31 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys buf.h src/sys/ufs/ffs ffs_vnops.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk mckusick 1999/03/01 20:04:31 PST Modified files: sys/sys buf.h sys/ufs/ffs ffs_vnops.c Log: When fsync'ing a file on a filesystem using soft updates, we first try to write all the dirty blocks. If some of those blocks have dependencies, they will be remarked dirty when the I/O completes. On systems with really fast I/O systems, it is possible to get in an infinite loop trying to flush the buffers, because the I/O finishes before we can get all the dirty buffers off the v_dirtyblkhd list and into the I/O queue. (The previous algorithm looped over the v_dirtyblkhd list writing out buffers until the list emptied.) So, now we mark each buffer that we try to write so that we can distinguish the ones that are being remarked dirty from those that we have not yet tried to flush. Once we have tried to push every buffer once, we then push any associated metadata that is causing the remaining buffers to be redirtied. Submitted by: Matthew Dillon Revision Changes Path 1.64 +2 -2 src/sys/sys/buf.h 1.55 +18 -10 src/sys/ufs/ffs/ffs_vnops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message