Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Apr 2002 11:59:43 -0500
From:      Steve Shorter <steve@nomad.lets.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: nfs_fsync: not dirty (possible solution)
Message-ID:  <20020401115943.A93416@nomad.lets.net>

next in thread | raw e-mail | index | archive | help
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
>                                        <dillon@backplane.com>

	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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020401115943.A93416>