chiark / gitweb /
journal: add debug mode for mmap-cache (--enable-debug=mmap-cache)
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 12 Dec 2014 16:57:22 +0000 (17:57 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 12 Dec 2014 23:46:16 +0000 (00:46 +0100)
commitfad5a6c66e73d3df20846906121d52159e1f6bf4
tree205cd89c4ee6a9185cbff630afe1dd3238056940
parentfc86aa0ed204922dcafa85353cb10e1aa7d91a76
journal: add debug mode for mmap-cache (--enable-debug=mmap-cache)

This is useful for exposing unsafe access to mmapped objects after
the context that they were mapped in was already moved.

For example:
journal_file_move_to_object(f1, OBJECT_DATA, p1, &o1);
journal_file_move_to_object(f2, OBJECT_DATA, p2, &o2);
t = o1->object.type; /* this usually works, but is unsafe */
configure.ac
src/journal/mmap-cache.c