fprintf(f, "lmaster: %u\n", ctdb_lmaster(ctdb, &key));
}
+ if (c->printhash) {
+ fprintf(f, "hash: 0x%08x\n", ctdb_hash(&key));
+ }
+
fprintf(f, "flags: 0x%08x", h->flags);
if (h->flags & CTDB_REC_FLAG_MIGRATED_WITH_DATA) printf(" MIGRATED_WITH_DATA");
if (h->flags & CTDB_REC_FLAG_VACUUM_MIGRATED) printf(" VACUUM_MIGRATED");
int printemptyrecords;
int printdatasize;
int printlmaster;
+ int printhash;
} options;
#define TIMELIMIT() timeval_current_ofs(options.timelimit, 0)
c.printemptyrecords = (bool)options.printemptyrecords;
c.printdatasize = (bool)options.printdatasize;
c.printlmaster = (bool)options.printlmaster;
+ c.printhash = (bool)options.printhash;
/* traverse and dump the cluster tdb */
ret = ctdb_dump_db(ctdb_db, &c);
c.printemptyrecords = (bool)options.printemptyrecords;
c.printdatasize = (bool)options.printdatasize;
c.printlmaster = false;
+ c.printhash = (bool)options.printhash;
for (i=0; i < m->count; i++) {
uint32_t reqid = 0;
{ "print-emptyrecords", 0, POPT_ARG_NONE, &options.printemptyrecords, 0, "print the empty records when dumping databases (catdb, cattdb, dumpdbbackup)", NULL },
{ "print-datasize", 0, POPT_ARG_NONE, &options.printdatasize, 0, "do not print record data when dumping databases, only the data size", NULL },
{ "print-lmaster", 0, POPT_ARG_NONE, &options.printlmaster, 0, "print the record's lmaster in catdb", NULL },
+ { "print-hash", 0, POPT_ARG_NONE, &options.printhash, 0, "print the record's hash when dumping databases", NULL },
POPT_TABLEEND
};
int opt;