Date: Tue, 17 Mar 1998 02:27:41 -0500 (EST) From: "John S. Dyson" <dyson@FreeBSD.ORG> To: michaelh@cet.co.jp (Michael Hancock) Cc: karl@mcs.net, root@danberlin.resnet.rochester.edu, current@FreeBSD.ORG, dyson@FreeBSD.ORG Subject: Re: WARNING WILL ROBINSON! Risk of severe filesystem damage suspected Message-ID: <199803170727.CAA11562@dyson.iquest.net> In-Reply-To: <Pine.SV4.3.95.980317155553.9759A-100000@parkplace.cet.co.jp> from Michael Hancock at "Mar 17, 98 03:57:39 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803170727.CAA11562>