From owner-freebsd-current Mon Mar 16 23:29:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA20813 for freebsd-current-outgoing; Mon, 16 Mar 1998 23:29:47 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA20807; Mon, 16 Mar 1998 23:29:42 -0800 (PST) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id CAA11562; Tue, 17 Mar 1998 02:27:41 -0500 (EST) (envelope-from toor) Message-Id: <199803170727.CAA11562@dyson.iquest.net> Subject: Re: WARNING WILL ROBINSON! Risk of severe filesystem damage suspected In-Reply-To: from Michael Hancock at "Mar 17, 98 03:57:39 pm" To: michaelh@cet.co.jp (Michael Hancock) Date: Tue, 17 Mar 1998 02:27:41 -0500 (EST) Cc: karl@mcs.net, root@danberlin.resnet.rochester.edu, current@FreeBSD.ORG, dyson@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The code as-is is correct. All of the evil was in vfs_subr.c:vtruncbuf. The vtruncbuf change was needed for some VM/buffer cache coherency problems, and unfortunately it didn't sync out metadata, when the rest of the upper level FFS code expected it to. After a while, the filesystem would irrecoverably loose it's mind. I lost 4 filesystems over this problem, and spent hours trying to recover the system and fix the problem. Michael Hancock said: > John, > > Is this what you meant? > > Mike > > Index: vfs_bio.c > =================================================================== > RCS file: /usr/cvs/src/sys/kern/vfs_bio.c,v > retrieving revision 1.156 > diff -u -r1.156 vfs_bio.c > --- vfs_bio.c 1998/03/16 01:55:22 1.156 > +++ vfs_bio.c 1998/03/17 06:03:47 > @@ -676,7 +676,7 @@ > break; > } > if (bp->b_flags & (B_NOCACHE|B_ERROR)) { > - int poffset = foff & PAGE_MASK; > + int poffset = poff & PAGE_MASK; > int presid = resid > (PAGE_SIZE - poffset) ? > (PAGE_SIZE - poffset) : resid; > vm_page_set_invalid(m, poffset, presid); > > -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message