vldb_check: rebuild free list with -fix
authorMichael Meffie <mmeffie@sinenomine.net>
Sat, 8 Nov 2014 18:14:27 +0000 (13:14 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 5 Jan 2015 02:30:03 +0000 (21:30 -0500)
commit3b9d52b2e8020cce65d55516db36580d58a51f0b
tree9511915feed10758b858c439860ab94f4a0f5176
parent9de36a0398a53fffd7bde8ed9e57573bed3b669d
vldb_check: rebuild free list with -fix

Rebuild the vldb free chain in addition to the hash chains when
vldb_check is run with the -fix option.  Print a FIX: message for
entries added to the free chain.

Example vldb with a broken free chain.

    $ vldb_check vldb.broken
    address 199364 (offset 0x30b04): Free vlentry not on free chain
    address 223192 (offset 0x36818): Free vlentry not on free chain
    address 235180 (offset 0x396ec): Free vlentry not on free chain
    Scanning 1707 entries for possible repairs

    $ vldb_check -fix vldb.broken
    Rebuilding 1707 entries
    FIX: Putting free entry on the free chain: addr=199364 (offset 0x30b04)
    FIX: Putting free entry on the free chain: addr=223192 (offset 0x36818)
    FIX: Putting free entry on the free chain: addr=235180 (offset 0x396ec)

Thanks to Kostas Liakakis for reporting this bug.

Change-Id: I57d6b17263ffe5f8818f70f8260a0dce8d85ab1f
Reviewed-on: http://gerrit.openafs.org/11598
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/vlserver/vldb_check.c