lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 08 Jan 2009 17:34:10 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Jörn Engel <joern@...fs.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC] B+Tree library V2

On Thu, 2009-01-08 at 17:24 +0100, Jörn Engel wrote:

> > Alright, back to this. I'm going to need something like the patch below
> > (except the update facility, which I thought I needed but then changed
> > my mind) which is on top of your patch. Does that look sane?
> 
> At first glance it does.  The update looks like someone might need it,
> but doesn't have a user yet.  The btree_merge is similar, as I used to
> need it, but no longer do.  Maybe #if 0 those two.

Sure, works for me. I just had written it and didn't want to keep it
from the world after changing my mind about needing it.

> Well, I used to have heaps of btrees around and wanted to share the
> mempool between all of them.  Not sure if I still do, I believe not.
> Will check.
> 
> If mempools aren't shared, I agree that encapsulating those bits is much
> nicer.

Just made the API a bit quirky, maybe just support both ways of using
things? Would only need a flag somewhere in the btree structure, I'd
think; ultimately it doesn't matter much to me though.

> > Another thing that I need is a visitor that deletes _some_ entries. How
> > can I do that? Additionally, it would be nice to be able to abort a tree
> > walk, when you have determined that you can't continue for whatever
> > reason.
> 
> If you want to open-code it, you can use btree_lookup_less().  I added
> that function sometime last month.  Basically something like this:
> 	key = btree_last(head, geo);
> 	while (key) {
> 		/* do something with key */
> 		key = btree_lookup_less(head, geo, key);
> 	}
> 
> Maybe it should be renamed to btree_get_prev_key().  I never noticed how
> confusing it was because my head was busy with other problems.  The code
> is currently burried within my logfs tree:
> http://logfs.org/git?p=logfs;a=summary

I don't think I've understood this yet. That code above there is a
backwards walk over the key space, and it's safe to call
btree_remove(key) at /* do something with key */?

> Will merge it with your patch and respin later tonight or tomorrow...

Cool, thanks. Mainly making it a module for testing anyway.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ