[PATCH] avoid lock oder violation between xattr.tdb and g_lock.tdb

Michael Adam obnox at samba.org
Tue Jul 12 15:12:48 UTC 2016


On 2016-07-12 at 17:03 +0200, Volker Lendecke wrote:
> 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.

Ouch. So without the below-mentioned rework of dbwrap_watch
(or another solution), we would need an additional lock oder
value(4)?

> 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.

Will do, thanks!

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160712/a94a976f/signature.sig>


More information about the samba-technical mailing list