]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a 'freeing free block' panic in UFS. The problem occurs when the
authorMatthew Dillon <dillon@FreeBSD.org>
Thu, 24 Feb 2000 20:43:20 +0000 (20:43 +0000)
committerMatthew Dillon <dillon@FreeBSD.org>
Thu, 24 Feb 2000 20:43:20 +0000 (20:43 +0000)
commitf8fa53397fb85593b3173db8562892aece9afc36
tree0d00bf4f0bda0d0b319ac438d9040d38845f7f5a
parent46b37d4e26adb92d60795dc6a4154d63e5d758d4
Fix a 'freeing free block' panic in UFS.  The problem occurs when the
    filesystem fills up.  If the first indirect block exists and FFS is able
    to allocate deeper indirect blocks, but is not able to allocate the
    data block, FFS improperly unwinds the indirect blocks and leaves a
    block pointer hanging to a freed block.  This will cause a panic later
    when the file is removed.  The solution is to properly account for the
    first block-pointer-to-an-indirect-block we had to create in a balloc
    operation and then unwind it if a failure occurs.

Detective work by: Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by: mckusick, Ian Dowse <iedowse@maths.tcd.ie>
Approved by: jkh
sys/ufs/ffs/ffs_balloc.c