tdb: no longer need seqnum store hack as we can read after prepare.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 25 Sep 2009 04:58:48 +0000 (14:28 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 25 Sep 2009 04:58:48 +0000 (14:28 +0930)
ccan/tdb/transaction.c

index 4a49cc7b6421848a0eac1efbff2cb9e4913bb367..34137251bce51f2697184fbd8dc515315b9d64c6 100644 (file)
@@ -919,11 +919,6 @@ static int _tdb_transaction_prepare_commit(struct tdb_context *tdb)
                return 0;
        }               
 
-#ifdef TDB_TRACE
-       /* store seqnum now, before reading becomes illegal. */
-       tdb_ofs_read(tdb, TDB_SEQNUM_OFS, &tdb->transaction_prepare_seqnum);
-#endif
-
        /* check for a null transaction */
        if (tdb->transaction->blocks == NULL) {
                return 0;
@@ -1012,13 +1007,7 @@ int tdb_transaction_commit(struct tdb_context *tdb)
                return -1;
        }
 
-       /* If we've prepared, can't read seqnum. */
-       if (tdb->transaction->prepared) {
-               tdb_trace_seqnum(tdb, tdb->transaction_prepare_seqnum,
-                                "tdb_transaction_commit");
-       } else {
-               tdb_trace(tdb, "tdb_transaction_commit");
-       }
+       tdb_trace(tdb, "tdb_transaction_commit");
 
        if (tdb->transaction->transaction_error) {
                tdb->ecode = TDB_ERR_IO;