In message <[EMAIL PROTECTED]>, 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
>:[EMAIL PROTECTED] "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
[EMAIL PROTECTED] "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message