[PATCHES] freelist defragmentation and (dependent) ctdb repacking
amitay at gmail.com
Mon Jun 16 23:46:58 MDT 2014
On Tue, Jun 17, 2014 at 2:09 AM, Michael Adam <obnox at samba.org> wrote:
> after a short discussion with Volker, here are two updated patchsets:
> The tdb patchset:
> - does not publish the tdb_freelist_merge_adjacend() function
> - tdb_freelist_size() calls tdb_freelist_merge_adjacend() if
> the db is not read only, otherwise operates as before.
> - Hence no version bump is needed
> - the tdbtool gets a new subcommand "freelist_size" which
> calls and prints the freelist size, thereby defragmenting
> the freelist, but there is no subcommand "merge_adjacent" any more.
> - The tdb_allocate_from_freelist() code got an extra twist
> that can help expansions of the db:
> When a new candidate was created by a merge but no candidate
> was found in the first walk, we do a second walk without
> before expanding.
> The ctdb patchset:
> - does obviously not call tdb_freelist_merge_adjacent any more
> and is hence an in principle unrelated cleanup, but it has
> the side effect of defragmenting the freelist when run with
> current tdb code, by calling tdb_freelist_size() even when
> repack_limit is set to 0.
> Cheers - Michael
As discussed, I have reviewed ctdb patchset and pushed since they are now
independent of the tdb changes.
More information about the samba-technical