From owner-freebsd-current Mon Jan 18 10:22:28 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA15088 for freebsd-current-outgoing; Mon, 18 Jan 1999 10:22:28 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA15082; Mon, 18 Jan 1999 10:22:25 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id KAA75229; Mon, 18 Jan 1999 10:22:19 -0800 (PST) (envelope-from dillon) Date: Mon, 18 Jan 1999 10:22:19 -0800 (PST) From: Matthew Dillon Message-Id: <199901181822.KAA75229@apollo.backplane.com> To: Luoqi Chen Cc: skynyrd@opus.cts.cwu.edu, freebsd-current@FreeBSD.ORG, jdp@polstra.com, luoqi@FreeBSD.ORG Subject: Re: NFS problem found - pleaes try this patch. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ahhhh. Yes, I see. I will unapply my patch and apply this one and test it. I'm not sure what the use of having m->valid and m->clean bits are at all if we have to munge them like this. Perhaps we should change these vm_page_t to a byte range in -4.0. I think we also need to redefine the way dirty bp's are handled, though, and at least panic if it tries to clear B_CACHE on something that B_CACHE should not be cleared on. -Matt Matthew Dillon :The check is correct and should be there, the B_CACHE bit was cleared because :I made a mistake when setting the valid bit in the vm page. : :Index: vfs_bio.c :=================================================================== :RCS file: /home/ncvs/src/sys/kern/vfs_bio.c,v :retrieving revision 1.192 :diff -u -r1.192 vfs_bio.c :--- vfs_bio.c 1999/01/12 11:59:34 1.192 :+++ vfs_bio.c 1999/01/18 14:45:33 :@@ -2171,7 +2171,7 @@ : (vm_offset_t) (soff & PAGE_MASK), : (vm_offset_t) (eoff - soff)); : sv = (bp->b_offset + bp->b_validoff + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1); :- ev = (bp->b_offset + bp->b_validend) & ~(DEV_BSIZE - 1); :+ ev = (bp->b_offset + bp->b_validend + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1); : soff = qmax(sv, soff); : eoff = qmin(ev, eoff); : } : :Note the calculation of ev, the original code was a round-up and I changed it :to round-down in my -r1.188 commit (I thought it was a bug in the original :code, but it was actually me who didn't understand the nfs code well enough). : :-lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message