]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
added a ctdb control for enabling the tdb seqnum
authorAndrew Tridgell <tridge@samba.org>
Fri, 4 May 2007 05:33:28 +0000 (15:33 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 4 May 2007 05:33:28 +0000 (15:33 +1000)
(This used to be ctdb commit c66920d9fb08a4a33418e2c1dcf1fc320fba3761)

ctdb/common/ctdb_control.c
ctdb/include/ctdb_private.h

index bd52d60453af550747539bd0ca828d1c92171191..4362e9508474bc42e511dab9e206c5a042e559a4 100644 (file)
@@ -395,6 +395,16 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
        case CTDB_CONTROL_DEREGISTER_SRVID:
                return daemon_deregister_message_handler(ctdb, client_id, srvid);
 
+       case CTDB_CONTROL_ENABLE_SEQNUM: {
+               uint32_t db_id;
+               struct ctdb_db_context *ctdb_db;
+               CHECK_CONTROL_DATA_SIZE(sizeof(db_id));
+               ctdb_db = find_ctdb_db(ctdb, db_id);
+               if (!ctdb_db) return -1;
+               tdb_enable_seqnum(ctdb_db->ltdb->tdb);
+               return 0;
+       }
+
        default:
                DEBUG(0,(__location__ " Unknown CTDB control opcode %u\n", opcode));
                return -1;
index 518df2900b8d22387ec3975287ac1d420549f460..879c8374301a7f924e428ad6b4eeaac8998c451a 100644 (file)
@@ -282,6 +282,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS,
                    CTDB_CONTROL_TRAVERSE_DATA,
                    CTDB_CONTROL_REGISTER_SRVID,
                    CTDB_CONTROL_DEREGISTER_SRVID,
+                   CTDB_CONTROL_ENABLE_SEQNUM,
 };