From owner-freebsd-stable Mon Apr 1 9: 5: 7 2002 Delivered-To: freebsd-stable@freebsd.org Received: from spitfire.velocet.net (spitfire.velocet.net [216.138.223.227]) by hub.freebsd.org (Postfix) with ESMTP id 80DB137B417 for ; Mon, 1 Apr 2002 09:05:01 -0800 (PST) Received: from nomad.tor.lets.net (H74.C220.tor.velocet.net [216.138.220.74]) by spitfire.velocet.net (Postfix) with SMTP id 5A25AFB452F for ; Mon, 1 Apr 2002 12:04:56 -0500 (EST) Received: (qmail 93425 invoked by uid 1001); 1 Apr 2002 16:59:43 -0000 Date: Mon, 1 Apr 2002 11:59:43 -0500 From: Steve Shorter To: freebsd-stable@freebsd.org Subject: Re: nfs_fsync: not dirty (possible solution) Message-ID: <20020401115943.A93416@nomad.lets.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matt Dillon recently said: > > and I found a case in brelse() where B_DELWRI is cleared on a buffer > marked B_DELWRI|B_INVAL without moving it out of the vnode's v_dirtyblkhd > list. Specifically, line 1214 if kern/vfs_bio.c: > > /* > * If B_INVAL, clear B_DELWRI. We've already placed the buffer > * on the correct queue. > */ > if ((bp->b_flags & (B_INVAL|B_DELWRI)) == (B_INVAL|B_DELWRI)) { > bp->b_flags &= ~B_DELWRI; > --numdirtybuffers; > numdirtywakeup(lodirtybuffers); > } > > I believe that the correct fix is to change this code to: > > /* > * If B_INVAL, clear B_DELWRI. We've already placed the buffer > * on the correct queue. > */ > if ((bp->b_flags & (B_INVAL|B_DELWRI)) == (B_INVAL|B_DELWRI)) > bundirty(bp); > > I would appreciate it if everyone who is able to easily reproduce this > panic would test this fix and post your results back to the list. If > this solves the problem I will commit it to -current and -stable. > > -Matt > Matthew Dillon > I have an uptime of about 30 hours, which was quite impossible with 4.5-R. If it panics I'll let you know, otherwise I'd say it fixes my problem. -steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message