[PATCH] Clean up tdb flags calculation in CTDB
amitay at gmail.com
Mon Jun 26 01:58:42 UTC 2017
CTDB's database attach controls were designed to pass the tdb open flags.
It means that clients (including samba) have to calculate the tdb flags
before opening to a clustered database exactly the same way as calculated
by ctdb daemon. This is counter-intuitive and prone to errors specially
when robust mutexes are involved. Once a clustered database is opened, all
the clients have to match the flags to attach to that clustered database.
This patch set cleans up database code in ctdb daemon and refactors the
logic to calculate tdb open flags in one place. For clients to know the
correct tdb flags to use while opening the database locally, a new control
is added which returns tdb_flags. This avoids the need to pass any
tdb_flags with DB_ATTACH controls and hence the flags are now ignored.
Please review and push.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 47691 bytes
Desc: not available
More information about the samba-technical