[PATCH] avoid lock oder violation between xattr.tdb and g_lock.tdb
vl at samba.org
Tue Jul 12 15:03:53 UTC 2016
On Tue, Jul 12, 2016 at 04:20:06PM +0200, Michael Adam wrote:
> Found by running selftest in my (wip) clustered member
> environment. xattr.tdb being of same lock-oder 2 as g_lock
> prevents fetch_locked->transaction on xattr.tdb in a
> clustered environment.
> Review appreciated.
> Cheers - Michael
> From 9f9189c9eeecfb95804a1259fb9a097007068a29 Mon Sep 17 00:00:00 2001
> From: Michael Adam <obnox at samba.org>
> Date: Thu, 22 May 2014 11:45:12 +0200
> Subject: [PATCH] g_lock: avoid lock order violation with xattr_tdb
> Bump g_lock lock order to 3 from 2 to move it out
> of the way of xattr.tdb which also has lock-order 2.
> This way, we can do ctdb transactions on xattr.tdb.
Not sure this will work. g_lock is a watched database, and if there is
lock contention, this will conflict with dbwrap_watchers.tdb.
Just by coincidence, I've started working on an alternative
dbwrap_watch implementation that can live without dbwrap_watchers.tdb.
Maybe you want to give my dbwrap_watch branch a quick peek. This is
work in progress, but I think this might be a way forward.
More information about the samba-technical