[RFC] tdb_traverse_read_lite()
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Mar 4 23:19:26 MST 2013
On Mon, Mar 04, 2013 at 05:57:15PM +1030, Rusty Russell wrote:
> Volker Lendecke <Volker.Lendecke at SerNet.DE> writes:
> > On Thu, Feb 28, 2013 at 02:11:18PM +1030, Rusty Russell wrote:
> >> Amitay asked me to look at a lightweight traverse for tdb. This is my
> >> first attempt (against his ctdb tree, but it's pretty simple).
> >
> > What about doing a traverse by chain? Sure, not atomic
> > whatsoever, but potentially even less intrusive.
> >
> > Volker
>
> I'm not sure what you mean... this traverses one chain at a time, but it
> holds the lock for that chain across the traverse function.
The API I had in mind traverses just one chain:
int tdb_traverse_chain(struct tdb_context *tdb, int chain,
tdb_traverse_func fn, void *private_data)
without dropping the locks in between the callbacks, just as
you did. This way a caller could sleep in between to slow
down a bit, and also learn a bit about the relative load on
the chains.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
**********************************************************
visit us at CeBIT: March 5th - 9th 2013, hall 6, booth E15
all about SAMBA and verinice, firewalls, Linux and Windows
free tickets available via email here : cebit at sernet.com !
**********************************************************
More information about the samba-technical
mailing list