fix a conflict in the merge from rusty
[metze/ctdb/wip.git] / server / ctdb_ltdb_server.c
index 47a2d6a693c2d2c488391a86ecdf53cc80bee1a1..9b3e7e071d0ca0d3dfe423d873cbc06493eae7f4 100644 (file)
@@ -589,7 +589,7 @@ static int ctdb_local_attach(struct ctdb_context *ctdb, const char *db_name,
                                           db_name, ctdb->pnn);
 
        tdb_flags = persistent? TDB_DEFAULT : TDB_CLEAR_IF_FIRST | TDB_NOSYNC;
-       if (!ctdb->do_setsched) {
+       if (ctdb->valgrinding) {
                tdb_flags |= TDB_NOMMAP;
        }
        tdb_flags |= TDB_DISALLOW_NESTING;
@@ -790,6 +790,9 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
        outdata->dptr  = (uint8_t *)&db->db_id;
        outdata->dsize = sizeof(db->db_id);
 
+       /* Try to ensure it's locked in mem */
+       ctdb_lockdown_memory(ctdb);
+
        /* tell all the other nodes about this database */
        ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, 0,
                                 persistent?CTDB_CONTROL_DB_ATTACH_PERSISTENT: