Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Dec 1999 02:48:09 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Proposed patch to fix VN device (again) 
Message-ID:  <11809.946345689@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 27 Dec 1999 17:43:19 PST." <199912280143.RAA35278@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




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