From owner-freebsd-current Mon Dec 27 17:48:19 1999 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 4565F1530E for ; Mon, 27 Dec 1999 17:48:16 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id CAA11812; Tue, 28 Dec 1999 02:48:09 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Matthew Dillon Cc: freebsd-current@FreeBSD.ORG Subject: Re: Proposed patch to fix VN device (again) In-reply-to: Your message of "Mon, 27 Dec 1999 17:43:19 PST." <199912280143.RAA35278@apollo.backplane.com> Date: Tue, 28 Dec 1999 02:48:09 +0100 Message-ID: <11809.946345689@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199912280143.RAA35278@apollo.backplane.com>, Matthew Dillon writes: >: >: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. Ok, fair enough: Then stop abusing struct buf for swap device access :-) If you want to abuse struct buf for swap device access, you will need to special case it as applicable. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message