vldb_check: Interpret VLOP_* vlentry flags
authorAndrew Deason <adeason@sinenomine.net>
Wed, 23 Jun 2010 15:13:39 +0000 (10:13 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 23 Jun 2010 22:03:42 +0000 (15:03 -0700)
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>

src/vlserver/vldb_check.c

index b6ab212..15bb24d 100644 (file)
@@ -425,7 +425,19 @@ readentry(afs_int32 addr, struct nvlentry *vlentryp, afs_int32 *type)
                quiet_println(" ro");
            if (vlentryp->flags & VLF_BACKEXISTS)
                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("\n");
            quiet_println("   LockAfsId     = %d\n", vlentryp->LockAfsId);