[PATCHES] improvements to tdbtool info

Jeremy Allison jra at samba.org
Thu Aug 7 14:35:40 MDT 2014


On Thu, Aug 07, 2014 at 10:25:16PM +0200, Michael Adam wrote:
> On 2014-08-07 at 13:03 -0700, Jeremy Allison wrote:
> > On Thu, Aug 07, 2014 at 12:04:24PM -0700, Jeremy Allison wrote:
> > > On Wed, Aug 06, 2014 at 05:24:26PM +0200, Michael Adam wrote:
> > > > Hi,
> > > > 
> > > > attached find three patches to improve precision and correctness
> > > > of "tdbtool info" when reporting dead space.
> > > > 
> > > > Review/push/comments appreciated.
> > > 
> > > LGTM - pushed.
> > 
> > I spoke too soon - running 'make test' inside
> > lib/tdb with this patch gives :
> > 
> > external: Dead space at 12288-1245184 (of 1245184)
> > external: tdb_transaction_recover: recovered 12288 byte database
> > external: Bad magic 0x0 at offset 12288
> > Step 310 check failed = OTHER_FAILURE
> > ../test/run-die-during-transaction.c:228:test_death(ops[i], agent)
> > make: *** [test] Error 1
> > 
> > I'll investigate.
> 
> I am really sorry!
> I seem to have posted prematurely.
> Let me fix that...

Looks like the same change you made inside
lib/tdb/common/summary.c for case TDB_RECOVERY_INVALID_MAGIC:
needs to be done to lib/tdb/common/check.c also.

In addition, that case statement has the horror:

                       break;
                default: ;
                corrupt:

within it. Can you fix the default: case so the
';' is split out onto at least a separate line,
or removed. It's seriously strange C there...


More information about the samba-technical mailing list