From owner-freebsd-current Mon Dec 27 17:43:24 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id C90A514BCE for ; Mon, 27 Dec 1999 17:43:22 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id RAA35278; Mon, 27 Dec 1999 17:43:19 -0800 (PST) (envelope-from dillon) Date: Mon, 27 Dec 1999 17:43:19 -0800 (PST) From: Matthew Dillon Message-Id: <199912280143.RAA35278@apollo.backplane.com> To: Poul-Henning Kamp Cc: freebsd-current@FreeBSD.ORG Subject: Re: Proposed patch to fix VN device (again) References: <11320.946345193@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : : :Ahh, I see the mistake. : :All you need to fix this is to add a new function: : : void : flushswchainbuf(struct buf *nbp) : { : if (nbp->b_bcount) { : nbp->b_bufsize = nbp->b_bcount; : if ((nbp->b_flags & B_READ) == 0) : nbp->b_dirtyend = nbp->b_bcount; : BUF_KERNPROC(nbp); : swstrategy(nbp); : } else { : biodone(nbp); : } : } : :And use this instead of flushchainbuf() in swap_pager_strategy(). : :-- :Poul-Henning Kamp FreeBSD coreteam member :phk@FreeBSD.ORG "Real hackers run -current on their laptop." Uh... no. The chain buffer routines are supposed to be generic. In fact, all the filesystem buffer cache I/O routines are supposed to be generic. There is no way I'm going to pollute them to special case swap. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message