Fix compression problem from Cliff Wright:
Break one: because b_cylinder, and b_resid are one and the same. The work the routine was commented as being its primary function, end of patition adjustment, is wiped out, as at the end of the routine b_cylinder is set, splat, doing a wipe out of the adjustment to b_resid. Break two: When doing the adjustment, a block count is created from a byte count, a block calculation is done, then the results are compared to the original byte count. i.e. apples to oranges, not blocks to blocks, but blocks to bytes. Break three: since if all the other drivers that used this routine would have broken as vnd compress did, I must assume they always ignored the results of this routine. So if end of patition adjustment is really required then all these other drivers have been broken for a long time.
This commit is contained in:
parent
5aa6f5addf
commit
15eacddccc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vnd.c,v 1.163 2007/03/04 06:01:43 christos Exp $ */
|
||||
/* $NetBSD: vnd.c,v 1.164 2007/03/05 02:55:32 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -137,7 +137,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.163 2007/03/04 06:01:43 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.164 2007/03/05 02:55:32 christos Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "fs_nfs.h"
|
||||
|
@ -491,6 +491,7 @@ vndstrategy(struct buf *bp)
|
|||
bp, vnd->sc_flags & (VNF_WLABEL|VNF_LABELLING)) <= 0)
|
||||
goto done;
|
||||
}
|
||||
bp->b_resid = bp->b_bcount;
|
||||
|
||||
/* If it's a nil transfer, wake up the top half now. */
|
||||
if (bp->b_bcount == 0)
|
||||
|
|
Loading…
Reference in New Issue