DragonFly BSD
DragonFly kernel List (threaded) for 2005-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Warnings added to try to find the ufs_dirbad panics


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Oct 2005 10:23:04 -0700 (PDT)

    I have added two checks and warnings to the buffer cache code.  If
    any of these warnings show up in your dmesg during normal operation
    (they are run-time warnings, not boot-time warnings), please report
    them immediately.

    This is somewhat of a shot in the dark, trying to track down the
    ufs_dirbad panics that get occassionally reported.  I have no idea
    whether the panics are related to these checks.  FreeBSD users are
    reporting similar panics so whatever the problem is it's something
    common to both them and us.

"Warning buffer %p (vp %p lblkno %d) was recycled"

    Occurs if a buffer is recycled unexpectedly.  The code will print this
    warning and retry the lookup if it detects the case.

    This can theoretically occur when a buffer acquisition races a
    buffer release.  We are supposed to be protected by a critical section
    here but the protection might not be sufficient on an SMP system
    if the vnode lock is contested (because the token code might block).

"Warning invalid buffer %p (vp %p lblkno %d) did not have cleared b_blkno cache"

    Occurs if a B_INVAL buffer's b_blkno cache has not been reset.  The
    code will reset the cache if it detects this case.

    B_INVAL buffers are supposed to be effectively destroyed by removing
    them from the (vp,lblkno) translation table.  However, this does not
    occur when a buffer is bqrelse()'d.  If a buffer marked invalid is not
    removed from the translation table re-acquisition of the buffer may
    not clear the b_blkno cache and potentially cause a stale filesystem
    block to be used for the buffer.

    It is unclear whether this situation can occur in real life.




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]