vldb_check: Interpret VLOP_* vlentry flags

The flags for each vldb entry can have various VLOP_* bits set to show
that the entry is locked, and for what reason. In vldb_check, output
these bits symbolically instead of mentioning them in "errorflags".

Change-Id: Iee7797bc701742e778391c07936eb771139bc8e9
Reviewed-on: http://gerrit.openafs.org/2236
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Andrew Deason 2010-06-23 10:13:39 -05:00 committed by Derrick Brashear
parent ee3d62beca
commit bd3f8adfe0

View File

@ -425,7 +425,19 @@ readentry(afs_int32 addr, struct nvlentry *vlentryp, afs_int32 *type)
quiet_println(" ro"); quiet_println(" ro");
if (vlentryp->flags & VLF_BACKEXISTS) if (vlentryp->flags & VLF_BACKEXISTS)
quiet_println(" bk"); quiet_println(" bk");
if (vlentryp->flags & 0xffff8fff) if (vlentryp->flags & VLOP_MOVE)
quiet_println(" lock_move");
if (vlentryp->flags & VLOP_RELEASE)
quiet_println(" lock_release");
if (vlentryp->flags & VLOP_BACKUP)
quiet_println(" lock_backup");
if (vlentryp->flags & VLOP_DELETE)
quiet_println(" lock_delete");
if (vlentryp->flags & VLOP_DUMP)
quiet_println(" lock_dump");
/* all bits not covered by VLF_* and VLOP_* constants */
if (vlentryp->flags & 0xffff8e0f)
quiet_println(" errorflag(0x%x)", vlentryp->flags); quiet_println(" errorflag(0x%x)", vlentryp->flags);
quiet_println("\n"); quiet_println("\n");
quiet_println(" LockAfsId = %d\n", vlentryp->LockAfsId); quiet_println(" LockAfsId = %d\n", vlentryp->LockAfsId);