From owner-cvs-all Fri Oct 12 13: 6:19 2001 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 6E99337B405; Fri, 12 Oct 2001 13:06:09 -0700 (PDT) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id f9CK61a15539; Fri, 12 Oct 2001 22:06:01 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Matt Dillon Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vnode_pager.c In-Reply-To: Your message of "Fri, 12 Oct 2001 11:17:34 PDT." <200110121817.f9CIHYU38714@freefall.freebsd.org> Date: Fri, 12 Oct 2001 22:06:01 +0200 Message-ID: <15537.1002917161@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Me and my laptop have been wondering about that bug for some time :-) Thanks! In message <200110121817.f9CIHYU38714@freefall.freebsd.org>, Matt Dillon writes : >dillon 2001/10/12 11:17:34 PDT > > Modified files: > sys/vm vnode_pager.c > Log: > Finally fix the VM bug where a file whos EOF occurs in the middle of a page > would sometimes prevent a dirty page from being cleaned, even when synced, > resulting in the dirty page being re-flushed to disk every 30-60 seconds or > so, forever. The problem is that when the filesystem flushes a page to > its backing file it typically does not clear dirty bits representing areas > of the page that are beyond the file EOF. If the file is also mmap()'d and > a fault is taken, vm_fault (properly, is required to) set the vm_page_t->dirty > bits to VM_PAGE_BITS_ALL. This combination could leave us with an uncleanable, > unfreeable page. > > The solution is to have the vnode_pager detect the edge case and manually > clear the dirty bits representing areas beyond the file EOF. The filesystem > does the rest and the page comes up clean after the write completes. > > MFC after: 3 days > > Revision Changes Path > 1.138 +22 -4 src/sys/vm/vnode_pager.c > > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message