ctdb-recoverd: Make recoverd context available in recovery lock handle
authorMartin Schwenke <martin@meltin.net>
Thu, 10 Jan 2019 02:24:34 +0000 (13:24 +1100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 5 Mar 2019 19:29:12 +0000 (19:29 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit c0fb62ed3954fc6e8667480aba92003fc270f257)

ctdb/server/ctdb_recoverd.c

index 473e6cbe8cc8d3bf9c6beda4a8582a2d253d0a00..c3beac7d18bd32d1258b409b37d0b8cae475d35d 100644 (file)
@@ -888,6 +888,7 @@ struct ctdb_recovery_lock_handle {
        bool locked;
        double latency;
        struct ctdb_cluster_mutex_handle *h;
+       struct ctdb_recoverd *rec;
 };
 
 static void take_reclock_handler(char status,
@@ -954,6 +955,8 @@ static bool ctdb_recovery_lock(struct ctdb_recoverd *rec)
                return false;
        };
 
+       s->rec = rec;
+
        h = ctdb_cluster_mutex(s,
                               ctdb,
                               ctdb->recovery_lock,